Programming
Programming a robot is different from programming a screen. The robot lives in a world of uneven floors, flat batteries and sunlight through the classroom window, so the code has to read sensors, make a decision and correct itself many times a second.
This section starts with block editors such as Scratch and Microsoft MakeCode and works toward typed languages like Python and Arduino C++. Older training sheets that used to sit at this address are long gone; these notes are written fresh and aimed at the kits schools actually use today.
- Read one sensor and print it. Every project gets easier once students can see the raw numbers.
- Make one decision. If the reading is above a threshold, do one thing; otherwise, do another.
- Loop and tune. Run it, watch it, change one number, run it again.
Notes in this section
-
N-03
How line-following robots work
Light sensors, thresholds, and the step from wobbly on/off steering to smooth proportional control, with a diagram and sample code.
-
N-06
From block coding to text coding
When students should move from Scratch or MakeCode blocks to Python, how to make the switch less painful, and what changes for robots.