Set up a robot

Box to driving. Do this once per robot, before the club starts — not during it.

1. Give it a name

Open kernel/robot_kernel.ino in the Arduino IDE and change one line near the top:

#define ROBOT_BLUETOOTH_NAME "Aqua Kitten"

Every robot needs a different name, or twelve identical entries appear in the Bluetooth list and nobody can find theirs. Let the kids choose; it is usually their first ever code edit.

2. Flash it

3. Watch it wake up

Switch it on and watch the sonar servo: it should wiggle once, left, right, centre. That wiggle is the robot telling you the servo is connected. No wiggle means it is plugged into the wrong header — fix that now, because half the later behaviours depend on it.

4. Check the sensors before the kids do

Open the Workshop, press Connect, pick the robot by name, then press Read sensors. You want:

Distancea sane number that changes when you move your hand
NOECHO0. A climbing number means the sonar never answered.
Line dotsfill when you slide something black underneath
Prox dotsfill when a hand is a few inches away
Rail4.90–5.10 V

5. Calibrate, and write it on the robot

Run the Calibrate tab top to bottom on the surface the club will actually use. Save the robot under its name, then write the two numbers on a strip of tape and stick it to the chassis — the browser remembers them, but only on that one device, and club night is not the time to discover that.

Serving these pages

The Workshop needs https:// or http://localhost, because browsers only allow Bluetooth from a secure page. The lessons, the Maze Lab and the cheat sheet work from anywhere, including a USB stick with no internet at all.

On Android Chrome, both Bluetooth and Location have to be switched on. This catches everybody once.