# 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)


---

# 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-eng.kittenbot.hk/functional_module/discontinued-modules/button.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.
