# AB按鈕魔塊

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

這是一塊按鍵模組，可以檢測按鍵是否按下。當按鍵被按下，模組背後應對的LED會亮燈。另外按鍵上亦可插上樂高十字軸。

![](https://kittenbothk.readthedocs.io/en/latest/_images/IMG_2569.GIF)

### 詳細介紹

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

### 產品參數

* 支援電壓：3V-5V
* 尺寸：56mm X 24mm X 25mm
* 接口：4pin防反插接口
* 類型：數字傳感器，按下按鍵，觸發事件

### 接線方法

將按鍵模組用4pin排線連接至Armourbit。

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

### MakeCode編程教學

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

#### 加載PowerBrick插件：

#### 在擴展頁直接搜尋powerbrick (PowerBrick已經過微軟認證，可以直接搜尋)

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

#### 你亦可以用插件地址搜尋

PowerBrick插件地址：<https://github.com/KittenBot/pxt-powerbrick>

#### [詳細方法](https://sharinghub.kittenbot.hk/programmingplatforms/makecode/kittenbotandmakecode)

#### AB按鍵模組積木塊:

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

#### 按鍵檢測

{% embed url="<https://makecode.microbit.org/_9k42wKXeaP6j>" %}

[參考程式網址](https://makecode.microbit.org/_9k42wKXeaP6j)

#### Makecode教學短片

{% embed url="<https://youtu.be/BT1TUlmbMm8?t=370>" %}

#### 示範短片

{% embed url="<https://www.youtube.com/watch?v=7uAsih1e66M>" %}

### 插件版本與更新

插件可能會不定時推出更新，改進功能。亦有時候我們可能需要轉用舊版插件才可使用某些功能。

詳情請參考: [Makecode插件版本更換](https://sharinghub.kittenbot.hk/programmingplatforms/makecode/makecodeextupdate)

### KittenBlock編程教學

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

#### 加載PowerBrick插件

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

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

#### AB按鍵模組積木塊

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

#### 按鍵檢測

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

[參考程式下載](https://bit.ly/PowerbrickM6_01sb3)

### FAQ

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

首先確保已經連接好Microbit，然後上載韌體再試一試。
