A Firefighter Robot?
A firefighter robot that detects fires in their first seconds and puts them out would help act immediately, reducing risks, saving lives, and protecting our spaces.
In this post we will talk about how we built a robot that detects a flame in front of it and, with a servo holding a water gun, aims and extinguishes it. All controlled by a micro:bit board.
The general idea of the firefighter robot will be quite basic since it was designed for a workshop of only 4 sessions (approx. 8 hours) of a Summer Camp; therefore the general idea will be: Move forward → Detect fire → Aim with the servo → Spray water → Extinguish. The robot will also have the option of being controlled via radio by another micro:bit for emergencies, for example if the car gets too close to the fire or if it doesn’t stop, etc.
The general circuit is shown in the following image. In the following steps we will show you how we did it in the workshop, but you are free to assemble your robot as you wish—that’s the fun of doing robotics.

What Will We Use?
- 2 micro:bits (1 for Robot + 1 for Radio Control)
- 1 Robotbit
- 2 DC gear motors, with two wheels
- 1 servo (to aim the water gun)
- 1 18650 battery
- Flame sensor
- Chassis (small/board wooden box)
- Breadboard
- Water gun + hose
- Cables, screws, plastic zip ties, double-sided tape
- LEGO pieces
For the chassis/base: you will need a small wooden board or a sufficiently strong and stable surface to serve as the chassis. In my case I used a wooden box I had stored. Make sure it supports motors, servo, battery, and fasteners.
Step 1: Motors to the Chassis
- Place the motors on the sides of the wooden chassis.
- Pass the plastic zip ties through the chassis holes (you can also use screws; the goal is to fasten them to the chassis on both sides).
- Tighten each motor firmly.
- Cut off the excess.
Step 2: LEGO Pieces to the Chassis
- Place 2 LEGO pieces like the ones in the image on each side of the chassis (they will serve as upper support for the robotbit).
- Secure with zip ties, passing them through the holes, and tighten.
- Cut off the excess.
Step 3: Servo to the Chassis
- Place the servo in the front-center part of the chassis.
- Fix it to the chassis with screws.
- Check that it is well tightened.
Step 4: Breadboard on the Chassis
- Place the breadboard on the top.
- Fix it with double-sided tape.
- Press to ensure adhesion.

Step 5: Base for micro:bit/Robotbit
- Place LEGO connectors on the chassis to create a flat base.
Step 6: Base for the micro:bit
- Add LEGO beams (straight bars) and LEGO connectors to hold the Robot:bit (we used blue connectors, but you can use any).
- Assemble everything as shown in the figure.
Step 7: Water Gun to the Servo Horn
- Place the water gun on the servo horn.
- Fasten firmly with plastic zip ties (without interfering with rotation).
Step 8: Hose
- Connect the hose to the water gun.
- Push until it is well adjusted to avoid leaks.
- Test that it does not come loose or separate when moving the servo.
Step 9:
- Place a container where the robot will store water. At first we used bowls without lids, but we switched to bottles since they were safer for keeping the water when the robot moved and thus avoiding leaks.

Programming and Control
Step 1: Radio Remote Control
Use two micro:bits: one as control (transmitter) and another in the robot (receiver). Set the same radio group and send commands: “Button A - Forward”, “Button B - Backward”, “Button A+B - Stop”.
Step 2: Servo Configuration
For the servo we used the S1 port of the Robot:bit board and defined the angles in a list. This idea was more practical for the kids to understand the servo movement and the direction of the water. The for loop gives it smooth and continuous movement.
Step 3: Flame Sensor
Now we have the protagonist of this story—the flame sensor. We are using an analog reading flame sensor (0–1023). After doing some tests and measurements on the flame intensity, we concluded that for values > 500 (flame detected) and when the values were > 900 (very close to the flame). For that reason we decided to place a micro:bit to control the robot by radio to avoid accidents.
So, following the previous code, we modified it in this way
Complete Code
Testing and Safety
- Test with a small candle, outdoors and with supervision.
- Adjust the flame sensor thresholds according to your real lighting.
- Check that there are no loose cables or leaks in the hose.
If you made it this far, thank you for taking the time to read and follow the steps. If you have questions, don’t hesitate to ask us in the comments or write in the contact section.