Mission 6: Give It Balance
Big Question
How can a robot notice tilt, bumps, or movement?
Your Mission
Add the motion sensor and read values from it. The robot brain will start to understand which way it is being moved.
Parts
- Bluepill on breadboard
- Motion sensor or accelerometer module
- Jumper wires
Build
- Place the sensor on the breadboard.
- Connect power and ground.
- Connect the data pins shown in ModuLab.
- Keep the sensor flat at first so you have a starting point.
Connect
- Press **Connect**.
- Open the motion sensor panel.
- Watch the values while the board is still.
Try It
Gently tilt the breadboard:
- left
- right
- forward
- backward
Do not shake the wires loose.
Success Check
- At least one value changes when you tilt.
- The values settle when the board is still.
- You can describe which movement causes the biggest change.
Debug
If the readings look wild:
- Hold the breadboard still.
- Check the sensor is not loose.
- Check power and ground.
- Move one direction at a time.
Remix
Make a balance alarm:
- flat means OK
- tilted means WARNING
Show the result with an LED or display message.
Robot Brain Idea
Robots need feedback. A motion sensor helps a robot know whether its body is level, falling, turning, or being bumped.
