BackSection Summary: Motion and Autonomy

Activities 2.12 – 2.14. Use this to review, or to fill in a definition you missed.
1. Motors and the Driver
A GPIO pin cannot supply enough current to turn a motor. The driver sits between your pins and the battery, and PWM decides how much of that power actually reaches each wheel.
- Motor Driver
- A chip that takes low-power instructions from your pins and switches high-power current from a battery.
- Duty Cycle
- The fraction of time a PWM signal is on. More on-time means more power.
- Differential Steering
- Turning by running two wheels at different speeds or directions instead of steering them.
- Standby
- The driver's off switch.
STBY must be HIGH before it will do anything at all.
2. Measuring Distance
The ultrasonic sensor does not report a distance. It reports how long an echo took, and your code converts that time into a distance — or gives up when no echo comes back.
- Ultrasonic
- Sound above the range of human hearing — what the sensor emits.
- Trigger and Echo
- Two pins: one tells the sensor to chirp, the other reports how long the echo took.
- Microsecond
- A millionth of a second. A thousand of them make one millisecond.
- Timeout
- Giving up on a measurement that never arrives, rather than waiting forever.
3. The Control Loop
Sense, decide, act — forever. Every autonomous machine has this shape, and the numbers inside it come from testing rather than from a reference.
- Control Loop
- Sense, decide, act, repeated indefinitely. The basic shape of every automatic machine.
- Autonomous
- Choosing what to do from its own sensor readings, with nobody steering.
- Tuning
- Adjusting numbers by testing, because no reference tells you the right values.
- Guarding
- Checking a value is real before comparing it, so a sentinel is not mistaken for a measurement.