# 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](https://sharinghub-eng.kittenbot.hk/programming-platforms/makecode-tutorial/kittenbot-and-makecode)

![](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)
