Resources/Troubleshooting

All guides

Wiring diagram

The line follower ignores the line

Sensor height, inverted black/white logic, and motors swapped left/right are the three QA repeats.

The problem

The mini delivery vehicle drives straight, spins in place, or hunts off the paper instead of following the black line.

Words used here

IR reflectance sensor
A small module that shines infrared light and measures how much bounces back. Dark tape reflects less than white paper, so the number changes when you cross the line.

Fix, in order

  1. 1

    Hold the sensors 2–5 mm above the paper. Too high and both read “white.” Too low and they snag. This height band is from QA on the cardboard chassis, not a datasheet.

  2. 2

    Print the two sensor values. Cover one with black tape. If the number goes up instead of down, invert the comparison in code (swap the > and <).

  3. 3

    If it always veers one way, swap the left and right motor wires or swap the analogWrite pins in code. Left sensor should slow the left motor when it sees extra black, or the opposite if your wiring is mirrored.

  4. 4

    Use a thick, matte black line on white paper. Pencil, shiny tape, and a line thinner than the sensor spacing will fail even with correct code.

Related builds

Also useful

Still stuck?

If you walked the steps and the mechanism still does not move, write to us. This is the fallback, not the first stop.

Contact support