# Button Module

Button Module Red(HKBM8006A)

Button Module Blue(HKBM8006B)

![../../\_images/button\_1.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/button_1.png)

This is a button, it is a digital moduele.

### Specifications

* Voltage: 3V\~5V
* Interface: Dupont Cable
* Return Value: Returns 0 when pressed, 1 when unpressed

### Wiring Diagram

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

```
This is a digital module, any pin in P1~P15 would work.
```

### MakeCode Coding Tutorial

![../../\_images/mcbanner.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/mcbanner.png)

![../../\_images/acbanner.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/acbanner.png)

#### This module can be used with Microbit and Meowbit.

**Reading the button value:**

#### Microbit:

![../../\_images/button\_code.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/button_code.png)

[Sample Code](https://makecode.microbit.org/_RLdA6wC7i1Vd)

#### Meowbit:[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/KBbutton.html#meowbit)

![../../\_images/button\_codeMeow.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/button_codeMeow.png)

[Sample Code](https://makecode.com/_8uvcymfjfav0)

### KittenBlock Coding Tutorial[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/KBbutton.html#kittenblock-coding-tutorial)

![../../\_images/kbbanner.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/kbbanner.png)

#### Load Robotbit Extension[](https://kittenbothk-eng.readthedocs.io/en/latest/functional_module/outdated/KBbutton.html#load-robotbit-extension)

![../../\_images/addRB.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/addRB.png)

**Reading the button value:**

![../../\_images/button\_code2.png](https://kittenbothk-eng.readthedocs.io/en/latest/_images/button_code2.png)
