# KOI MicroPython編程快速入門(需要SD卡)

## KOI MicroPython編程快速入門(需要SD卡)

KOI也支援使用MicroPython編程，詳情請參考本教程。

![](https://kittenbothk.readthedocs.io/en/latest/_images/031.png)

### 編程方法1：KittenBlock編程

#### 1. 在KittenBlock連接KOI。

[詳細教學](https://kittenbothk.readthedocs.io/en/latest/AI%20Cam/kittenblock/kittenblock.html)

![](https://kittenbothk.readthedocs.io/en/latest/_images/connect41.png)

#### 2. 用KittenBlock的Python編輯器編程。

![](https://kittenbothk.readthedocs.io/en/latest/_images/044.png)

### 編程方法2：KittenCode編程

[詳細教學](https://kittenbothk.readthedocs.io/en/latest/KittenCode/interface.html)

![](https://kittenbothk.readthedocs.io/en/latest/_images/051.png)

### 編程方法3：任何Python編輯器

#### 1. 將SD卡插入KOI然後開機。

![](https://kittenbothk.readthedocs.io/en/latest/_images/025.png)

#### 2. 將SD卡插入電腦，你會在SD卡上看見一個boot.py的檔案。

![](https://kittenbothk.readthedocs.io/en/latest/_images/017.png)

#### 2.1 或者你可以直接在SD卡新增boot.py檔案，寫入以下代碼。

```
from fpioa_manager import *
from koi import *
# bootup comm code
```

#### 3. 新增一個main.py檔案，在main.py編程。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sharinghub.kittenbot.hk/airelated/koi/kittenblock_micropython/qs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
