Lesson 05 · 60 minutes
Your First Program
Blocks, and what the robot actually receives
Today's goal
Build a program from blocks, send it, run it, and read the same program back off the robot.
Ideas in this lesson
- A program is a list of instructions, run in order, with nobody watching
- The robot has no eyes on your intentions — only your steps
- Blocks and text are two views of the same thing
- The robot remembers: programs survive being switched off
Sense → Think → Do
THINK, written down in advance. The robot does exactly what you wrote, which is the whole joy and the whole problem.
How the session runs
- Open the Blocks tab. Tap 'set speed', then 'drive rooms'. Watch the text box fill in underneath.
- Look at the robot language:
V 5thenF 900. Every block is one line. - Press Send to robot. Watch for SAVED steps=2 — that number must match your block count.
- Press Run. Watch each step announce itself as it happens.
- Now press 1 on the IR remote. The same program runs, with no phone at all.
- Save a different program to Slot 2 and switch between them from the remote.
Sample program
Drive one room, turn a quarter turn left, drive one more room. An L-shaped path — the smallest program that goes somewhere interesting.
V 5 F 900 L 350 F 900
Paste it into the Workshop's Robot language box, then press Text → blocks to see it as blocks — or just send it straight to the robot.
Try this
- Write a program that draws a triangle. What angle do you need, and how do you get it from quarter turns?
- Write the shortest program that returns the robot exactly to its starting spot.
- Put a program in each of the three slots so a partner can run them from the remote without knowing what they do.
When it goes wrong
| What you see | What it means |
|---|---|
| SAVED steps= does not match your block count | Some of the program was lost on the way. Send it again; if it keeps happening, say so — that is a real bug, not your mistake. |
| Robot runs the wrong program | Check which slot is selected. The slot button glows. |
Notes for the grown-up
The read-back is the moment worth pausing on: press Read back and watch their program appear from the robot's own memory. That is when 'the robot stored it' stops being a claim and becomes a fact.