Collision-Avoidance Robot
Two-wheeled robot with a purple control board sensing an amber obstacle with a translucent blue detection cone.
Build a robot that senses obstacles, stops, backs away, and turns before a collision.
Steps
  1. Mount motors, wheels, and board on the chassis.
  2. Wire a forward-facing distance sensor and connect the battery pack.
  3. Write drive(left_speed, right_speed): -100 is full reverse; 100 is full forward.
  4. Loop: drive forward while the distance exceeds your chosen stop threshold.
  5. At the threshold, stop, back up, turn about 90 degrees, then drive forward.
  6. 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