PDA

View Full Version : Line Following Help



b3ttykr0ck3r
12-05-2011, 06:08 PM
Hey guys, here is the issue that I have. I am currently working on a line following project, using the code from the book and the sensors set up the way defined in the print. My robot only seems to follow the white however. The course is a 4' x 8' sheet of plywood with white fabric laid over the top. On top of the fabric is the black stripe, made in accordance to the projects in Chapter 8. My robot will follow the edge of the line (seeing the white) but when placed perdundicular to the line the robot will travel forward, see the line and stop not knowing what to do. Is there some values that I need to be adjusting to sense black instead of white? Any help would be greatly appricated. Thanks!

erco
12-06-2011, 01:57 AM
Please show your source material exactly, quoting the book & page number. Either attach a link here, or copy & attach the schematic itself.

Using photocells (a bit dodgey) or phototransistors (better) to sense black & white comes down to some kind of A/D converter. You might be using the sensors in a voltage divider arrangement for direct high/low inputs to the Stamp (fast), or reading them using RCTIME (much slower). Either way, the particular sensors you are using, their location, the reflectivity of your black line, and the illumination are all variables that need to work together to work properly. You need to break out a multimeter to measure & verify voltage/resistance differences between light & dark. You want to maximize the sensor reading differences between black & white.