This tutorial was contributed by Luo Beiyu from the National University of Singapore.
Step 0 – Pre-build Overview
MATERIALS: 1 x BBC micro:bit, 1 x Micro USB cable, 1 x Breakout board, 1 x Crash Sensor, 1 x OLED, 1 x Buzzer, 2 x Female-Female jumper wires
- Get to know the Crash Sensor, OLED and Buzzer
- Make something with a OLED
- Make something with a Crash Sensor
Step 1 – Components
Step 2 – Pre-coding
Note: If you get a warning telling you some packages will be removed because of incompatibility issues, either follow the prompts or create a new project in the Projects file menu.
Step 3 – Coding
When the Crash Sensor is triggered, the buzzer will sound and the OLED will display the message “Intruder Detected”. Or else, if there is no force is applied to the Crash Sensor, the buzzer will not sound and the OLED will display the message “The house is safe”.