# MicroCode 編程教學

### MicroCode用法

MicroCode支援Micro:bit V2，用家只需要將MicroCode下載到Micro:bit就可以開始使用。

首先用USB線將Micro:bit連接到電腦。前往MicroCode官網。

[MicroCode官網](https://microsoft.github.io/microcode/#H4sIAMDPv2MAA32OWwuCMBiG/1JmB3aZIrXhFJmH5V1lwre0AhWdv75PZ9BVVy8PvKe7Zv2tJs/8mNZUvfe0OkBYtah0UY7aQDJ6IEUPkaC7TDMnTAzHhoMAWFGK4cdP//q5chwKyPEZpFw1+CPG/Svmt5Fghe8yZ+aHN3B35sDwSnMPu6aMbS2b5muZWsQ/4Tbght2SpVdMua939rhsnUs2XjLSUfWCQtEucDeaAyMf85b1ohABAAA=)

假如還未下載MicroCode到Micro:bit上，可以按Download MicroCode下載。

<figure><img src="/files/agZRWOUThBWWC0dZKYXE" alt=""><figcaption></figcaption></figure>

然後將hex檔上傳到Micro:bit。

<figure><img src="/files/xoaG3o2aSv2oRLXD0JZE" alt=""><figcaption></figcaption></figure>

連接電池盒到Newbit。

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

打開電源後屏幕就會顯示MicroCode的介面。

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

然後就可以開始編程。

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

### 編程教學

在MicroCode的主頁有2個選項，第一是編寫程式，第二是打開範例。

使用Newbit的方向鍵選擇，按A確認。

進入編程的頁面後就會顯示先前儲存的程式，您可以繼續更改。

進入範例頁面就可以打開各種示範程式，或者建立新程式。選擇或建立程式後就會打開該程式的編程頁面。


---

# 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/expansion_board/newbit-arcade-shield/newbitmicrocode.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.
