White line following

I’m trying to figure out how to invert the sensor readings on the 3pi and I’m having some trouble. Ultimately I’m trying to adapt the maze-solving algorithm so instead of having the 3pi solve a line maze, it will solve a conventional walled maze (with black lines as the walls).

I’ve tried some suggestions on a few other forums but so far I’m not having a lot of luck. I’ve tried adjusting the if statements at the end of follow-segment file and a few if statements in maze-solve.c, but its not working and I’m not sure if there’s a better way to do it. If anyone has had any luck with this or know how I can do it, I’d really appreciate it.


If you were to go from a small black line, to a small white line it would be fairly easy. However, it sounds like you are trying to adapt code for a small black line maze, to a maze with white “lines” wider than the 3pi. This most likely calls for a complete rewrite of the maze solving code and possibly additional sensors depending on the requirements.

- Ryan