So I want to make a line following robot. In my electronics 12 class we are making one but out of an LM393 or something like that. It just measures which voltage source is greater then distributes more voltage to different side of a circuit to drive the motors. Now the challenge is to get the photoresistors calibrated and balanced because slight resistance changes affect it.
So here is my idea to how to approach the programming.
Basically photo resistors on lets say analog pins 2 and 3. Motors on digital pins 9 and 10 and use a voltage divider between motors and arduino.
Then basically get arduino to check which photo resistor has more or less light depending on surface and line to be followed. If the photoresistors show a the same value or close to the same value then it will go full to both motors.
So basically the resistors will be in their of little plastic squares which eliminates outside light and so they can only focus on the light in front.
So what do you say? DO I have the idea right or should I add more things or consider certain parts in my code?