Lesson 13 · 60 minutes

Two Robots, One Room

Sharing space, control, and the airwaves

Today's goal

Run two robots at once without either one interfering with the other, and explain what could go wrong.

Ideas in this lesson

Sense → Think → Do

The same loop, twice, in one room — and now the environment includes another robot.

How the session runs

  1. Two robots, one IR remote. Press 5. Watch both react. Explain why.
  2. Now connect each robot to its own phone by name. Notice you must pick the right name.
  3. Give them opposite modes: one avoiding, one seeking. Watch them interact.
  4. Set them nose-to-nose in follow mode. What happens, and why is it unstable?
  5. Agree a room rule for the maze race: how do teams avoid running two robots into each other?

Try this

When it goes wrong

What you seeWhat it means
Both robots react to one remoteIR is a broadcast with no addressing. That is a property of the medium, not a bug.
A phone connects to the wrong robotNames come from the firmware. Check ROBOT_BLUETOOTH_NAME at the top of the kernel.
Notes for the grown-up

The nose-to-nose follow demo is worth doing deliberately: two followers create a feedback loop with no damping, and they oscillate. It is a genuinely surprising and memorable result.

← When Sensors LieDesign Your Own Behaviour →