Hello, I want to implement a line following robot using an original Arduino Uno. I tried reading the signals from the IR line sensors using both analogRead from analog pins and digitalRead from digital pins. But instead of getting different values for white and black surfaces I am getting same for both. But the value changes only if I move my sensor away from the surface.
So in a way my line sensors are detecting only proximity not color. I tried using different sensors. I even used a sensor array that I had previously used for line sensing. But now the same sensor is giving me proximity instead of detecting color. I even tried changing the surface. I tried both flex and paper, with same results.
I am sure I am missing something very very basic, but I am at my wits end. Please help.
I tried reading the signals from the IR line sensors using both analogRead from analog pins and digitalRead from digital pins. But instead of getting different values for white and black surfaces I am getting same for both.
The IR sensor detects the amount of IR that is reflected off the target. It does not measure colour.
In IR the reflectance of your line looks like it is the same as the non line. By backing off the sensor you should be able to find a point where it can distinguish between the two states, but a better line would be better.