Distance Sensors
Watch an ultrasonic echo become a distance, scan a playroom with sonar and laser, print readings to a serial monitor, then make Spark stop at any wall, beep like a parking sensor, find the way out of a room and follow a person.
- Variables and Functions for Robots: Step through programs and watch memory boxes and function calls change, see why named values beat magic numbers, write forward(cm) and polygon(), then calibrate Spark and keep its warehouse round working as the battery runs down.
- Servos and Grippers: Watch a servo’s feedback hold its angle against a push, find the right squeeze for a block, a ball and a raw egg, learn why servos need time, then program Spark’s arm and claw to fetch toys and tidy the playroom.