> For the complete documentation index, see [llms.txt](https://sharinghub.kittenbot.hk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharinghub.kittenbot.hk/programmingplatforms/kittenblock/an-zhuang-ban-kittenblock/kittenblock_microbit/connecting.md).

# 在Kittenblock連接Micro:bit

我們要在Kittenblock上使用Microbit，就首先要與Microbit建立連接。

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

首先將Microbit用USB線連接到電腦。

在左上角小貓logo旁邊的硬件欄選擇硬件，加載Microbit與硬件的插件。

```
這教程使用Powerbrick作例子，請大家按照自己手上的硬件作選擇。
```

Microbit V1請選擇Powerbrick，Microbit V2可以選擇Microbit v2 python。

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

在Microbit的積木欄中按下感嘆號 ( ! ) 按鈕。

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

然後點選『開始連線』。

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

連接完成！

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

成功連接後，MicroBit會顯示心形。

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

假如沒有顯示心形，可以按下恢復固件。

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

### 連接測試

按下Microbit的積木，Microbit應該會即時有反應。

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

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

### 上載程式

在Kittenblock平台上也可以將程式上載到MicroBit，不用永遠連着電腦使用。

首先按右上角的代碼按鈕，切換至代碼模式。

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

然後按下翻譯，將積木轉換成Python代碼。

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

最後按下上傳，程式就會下載到Microbit上，實現離線操作。

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

### FAQ

1：為什麼我點擊積木塊沒有反應呢？

首先確保已經連接好Microbit，然後恢復固件再試一試。
