Collision-Avoidance Robot
Build a robot that senses obstacles, stops, backs away, and turns before a collision.
Steps
- Mount motors, wheels, and board on the chassis.
- Wire a forward-facing distance sensor and connect the battery pack.
- Write drive(left_speed, right_speed): -100 is full reverse; 100 is full forward.
- Loop: drive forward while the distance exceeds your chosen stop threshold.
- At the threshold, stop, back up, turn about 90 degrees, then drive forward.
- Test on a clear floor. Retune for reliable avoidance.
Stretch Goal
Try a smaller space. Retune stop distance, speed, backup time, and turn angle.
Advanced Card
Robotics