Example Code for micro:bit-Firefighting Robot (Programming)
We use servo to simulate the switch of water tank, when a fire occurs, the servo will rotate to turn on the switch to put out the fire and the buzzer will buzz to give an alarm after the flame sensor detects the flame.
Hardware Preparation
![]() |
![]() |
![]() |
|---|---|---|
| BOS0007 Flame Sensor | BOS0020 Buzzer | SER0045 Boson: 9g Metal Gear Micro Servo |
![]() |
![]() |
|
| MBT0039 Micro:bit | BOS0040 Micro:bit BOSON Expansion Board |
Software Preparation
Makecode or Mind+
Wiring Diagram

Additional Information

Was this article helpful?





