Meowbit Guide 05 - Accelerometer

 Go back to Product Documents Navigation 

 Go back to Meowbit Documents Navigation 

 

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

../_images/accel6.png

MakeCode Arcade Coding Tutorial

../_images/acbanner1.png

Load Controller Extension

Loading Extensions

(This sensor may not work with MakeCode Arcade due to the bug of the platform)

../_images/sd5_1.png

../_images/light1_1.png

 

Blocks for Controller Extension

../_images/light2_1.png

 

Detecting rotation

../_images/accel1_1.png

The rotation value ranges from 0 to 1023.

Sample Code Link

 

Detecting gestures

../_images/accel2_1.png

Sample Code Link

 

Kittenblock Coding Tutorial

../_images/kbbanner.png

 

Blocks for onboard sensors

../_images/kb10_1.png

 

Getting the acceleration

../_images/accel3_1.png

 

Getting the rotational acceleration

../_images/accel4_1.png

 

Getting the tilting degree

../_images/accel5_1.png

../_images/accel7.png../_images/accel8.png

 

Detecting gestures

The gestures can be detected in 2 ways.

../_images/accel9_1.png

../_images/accel10_1.png

 

 

If you have any question, please feel free to contact us at Discord, we will always be there to help.

 

KittenBot Team

 

 Go back to Product Documents Navigation 

 Go back to Meowbit Documents Navigation 

Leave a comment

Please note, comments need to be approved before they are published.