Hello everyone,
I am programming a robot to register a line using two line sensors. The robot will be moving forward, and there are lines perpendicular to it. I am using two sensors on either side of the robot so that it can self correct itself if it starts drifting off in either direction. So if one sensor sees the line before the other then it needs to turn a little to correct its heading. It seems simple enough but I don't know how to code which sensor read the value first. I am using the arduino IDE to do this. I am grateful for any suggestions you have, and if you have any questions I would be happy to answer them.
-John
I am programming a robot to register a line using two line sensors. The robot will be moving forward, and there are lines perpendicular to it. I am using two sensors on either side of the robot so that it can self correct itself if it starts drifting off in either direction. So if one sensor sees the line before the other then it needs to turn a little to correct its heading. It seems simple enough but I don't know how to code which sensor read the value first. I am using the arduino IDE to do this. I am grateful for any suggestions you have, and if you have any questions I would be happy to answer them.
-John