Timing and Doing Two Things at Once
Find out why sleep() makes a robot blind, read Spark’s clock with ticks_ms(), juggle several jobs in one fast loop, then give the night patrol a flashing beacon that never stops it watching.
- States and Modes: Give Spark modes with a state machine: draw states and arrows, find out why a robot needs memory, hunt bugs only state machines have, then program a night patrol that waits for the caretaker, waits for people and turns only at walls.
- Wheel Encoders: Find out why driving by time goes wrong, count wheel turns with an encoder, drive exact distances, keep straight with unequal motors and turn exact corners, then deliver the register on Spark’s worst days.