Page 85 - Robo_Genius_V1.0_flipbook_C5
P. 85
Accelerometer and Shaking Dice
In this activity we will make a shaking dice
using micro:bit. It is having an accelerometer
sensor which basically works as motion sensor.
So, in this activity we will make a shaking dice
that means whenever we shake micro:bit it
will print a random number.
The Micro:bit has a variety of sensors. One of
these sensors includes an accelerometer. The
accelerometer is behind the B- button. A label
on the micro:bit behind the button’s points
to the motion sensor. The accelerometer
measures motion. The motion comes from lifting or rotating the Micro:bit.
The accelerometer measures motion in three different directions. It measures
motion when the Micro:bit is moved side to side or up and down.
The micro:bit measures movement along three axes:
X - Tilting from left to right.
Y - Tilting forwards and backwards.
Z - Moving up and down.
The accelerometer measures motion. It measures motion in varying degrees
from slight motion to extreme motion. The accelerometer also uses gravity to
Programming with Micro:bit-Based Programming 83

