ModuLab logo ModuLab Build • Play • Explore
Classroom Login Register

Robot Brain Mission 6 - Give It Balance Pupil Notes

Add the motion sensor and read values from it. The robot brain will start to understand which way it is being moved.

In This Lesson

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

  1. Place the sensor on the breadboard.
  2. Connect power and ground.
  3. Connect the data pins shown in ModuLab.
  4. Keep the sensor flat at first so you have a starting point.

Connect

  1. Press **Connect**.
  2. Open the motion sensor panel.
  3. 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.