In this project we will create an alarm system with microb:bit. This alarm mainly uses an ultrasound sensor, buzzer and LED.
When the ultrasonic sensor detects an obstacle at a distance < 5cm, the micro:bit board orders the buzzer to ring and the red LED to light up.
To complete the assembly,
The mounting methods are numerous and here are some examples:
Here is the makecode program of the audible alarm system: