Making & DIYrelated: r/arduino

Build a robot that follows a line

Two motors, two sensors and an Arduino. It follows a strip of black tape on the floor.

time
a weekend
cost
cheap
effort
some effort
where
at your desk and floor

what it is

  • Line followers use infrared sensors that see the difference between dark tape and a light floor.
  • It is the classic first robot because the logic is simple: if the left sensor sees black, turn left.

how it goes

  1. Buy a 2WD robot car kit with TT motors, a motor driver like the L298N and two IR sensors.
  2. Assemble the chassis and wire the motors to the driver and the driver to an Arduino.
  3. Upload a simple sketch that reads both sensors and sets motor speeds.
  4. Lay a loop of black electrical tape on a light floor.
  5. Tune the speed and add a third sensor for sharper corners.

you need

  • robot car kit
  • Arduino
  • IR sensors
  • electrical tape

why try it

Seeing your code drive a robot is exciting. People race them against each other.

More in Making & DIY, or pick a niche.