Mission 2: Give It A Heartbeat
Big Question
How can a robot show that it is alive and running?
Your Mission
Add an LED heartbeat so your robot brain can show a repeating signal. A heartbeat is useful because it tells you the program is still running.
Parts
- Bluepill on breadboard
- LED module or LED circuit
- Resistor if your LED is not already on a module
- Jumper wires
Build
- Keep the Bluepill from Mission 1 on the breadboard.
- Add the LED module.
- Connect the LED signal wire to the lesson pin shown in ModuLab.
- Connect power and ground as shown in the breadboard view.
Connect
- Plug in USB.
- Press **Connect**.
- Open the LED panel.
Try It
Turn the LED on and off first.
Then make a heartbeat pattern:
- on
- off
- pause
- on
- off
- pause
Success Check
- The LED follows the app controls.
- The heartbeat repeats.
- You can explain which wire carries the signal.
Debug
If the LED does not light:
- Turn the LED around if it is a loose LED.
- Check ground is connected.
- Check the signal wire is in the correct breadboard row.
- Try the built-in LED again to prove the board is still connected.
Remix
Create three moods:
- calm heartbeat
- excited heartbeat
- danger heartbeat
Robot Brain Idea
Robots often use status lights. One small LED can tell a human whether the robot is ready, busy, stuck, or waiting for instructions.
