eBay had a line follower cart kit.
It has two motors and a two light sensors and LEDS and a LM393 comparator.
It has a circuit:
The LM393 uses an open collector output that sinks current to turn on the motor.
The comparator needs the inputs to be about 1.5V below the positive supply. This means it is more that a comparator.
There are two comparators, one for each motor, but the + and - inputs are wired contral making it look like a comparator with an inverter on the output.
However they are only comparators if the -ve input is 2V below the positive supply!
sensor1 | sensor2 | motor1 | motor2 |
dark | dark | on | on |
bright | brighter | off | on |
brighter | bright | on | off |
Mater sure it turns in circles on a bright surface, and goes straight on dark surface.
Now the fun starts!