# Meowbit’s Accelerometer

Meowbit has a built-in accelerometer for measuring rotation and acceleration of the device, as well as detecting different gestures.

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

### MakeCode Arcade Coding Tutorial

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

#### Load Controller Extension

#### [Loading Extensions](/programming-platforms/makecode-tutorial/kittenbot-and-makecode.md)

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

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

#### Blocks for Controller Extension

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

#### Detecting rotation

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

```
The rotation value ranges from 0 to 1023.
```

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

#### Detecting gestures

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

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

### Kittenblock Coding Tutorial

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

#### Blocks for onboard sensors

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

#### Getting the acceleration

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

#### Getting the rotational acceleration

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

#### Getting the tilting degree

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

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

#### Detecting gestures

The gestures can be detected in 2 ways.

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

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/accel10_1.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/main-controllers/meowbit/meowbit-programming-tutorial/meowbits-accelerometer.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.
