Instructions
PROJECT 2. MOVEMENT ALARM
You will need:
• micro:bit
• MonkMakes RGB LED for micro:bit
• Program: P2 Movement Alarm
Flash the program P2 Movement Alarm onto your
micro:bit from the following address:
https://makecode.microbit.org/_4Ej08FdLFfku
Then connect the RGB LED as shown to the right.
Try moving your micro:bit. As soon as you do, you should hear a tune start to play
to indicate that the alarm has been triggered and the RGB LED color will change
from Green to Red.
How it Works
The program uses the micro:bit's built in accelerometer to measure any force acting
on it as a result of it moving. When the micro:bit starts running the program, the
micro:bit is assumed to be completely still and an initial reading is taken (baseline)
but when the micro:bit is picked up, the accelerometer reading will change.
Page 10