Making a Robot Think · Lesson 7 of 11
Inputs and outputs
Everything is in or out
To a controller, the whole world is inputs and outputs.
- An input is information coming in, usually from a sensor (a distance, a button press).
- An output is a signal going out, usually to an actuator (turn a motor, light an LED).
Your code's job is to turn inputs into the right outputs. Read an input, apply some logic, produce an output. Get that mapping right and the robot behaves correctly. This is the heart of all robot programming.
Practice
List two inputs and two outputs for a robot that turns on a light when a room gets dark.
You’re reading for free. Sign in to keep your progress and earn a certificate when you finish.Sign in to keep my progress →