Thinking in steps

Design a sequence of instructions and a decision rule.

← Back to syllabus
Illustrative engineering concept
AI-generated concept photo; not a wiring diagram.
Safety first

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

30 cm — GO

Knowledge check

In the simplified model, what happens at 10 cm with a 20 cm threshold?

Independent challenge

Write a decision rule for a night-light. State what should happen if the sensor reading is invalid.

Next step →