These activities are simulations. Physical experiments require a suitable low-voltage supply, checked wiring and adult supervision for children. Never connect to mains.
Algorithm
An algorithm is a sequence of instructions that solves a problem.
Input and output
A sensor provides information; a program processes it; an output changes a device or communicates a result.
Conditions
A condition can be true or false. Example: if distance is below 20 cm, stop; otherwise continue in this simplified model.
Debugging
Test representative inputs and compare observed outputs against the expected result. A real robot also needs invalid-reading and timeout handling.
Try it yourself
Knowledge check
Independent challenge
Write a decision rule for a night-light. State what should happen if the sensor reading is invalid.
Next step →