3pi with 8 sensors, help needed

Does someone will give an instructions how to change 3pi original line following code and schematic to have all 8 sensors (QTR-8A or RC) used. This is nice code, we used it in slightly modified (PID algorithm, initial speed selection by buttons) format on our local competition and had an excellent results, beat of all local robots but not Latvian ones. We’d like to go further with the same code, but with increased speed, reading frequency and we’d like to have more precise readings by adding QTR-8 sensor. I tried but it was too hard to find all codes in related libraries.

Thanks for advance, Veiko

Hello, Veiko.

I’m am not really sure what you are asking. Are you asking for help to modify the 3pi code to work with your own line following robot, or are you trying to add a QTR-8A sensor array to your 3pi?


We modify the same 3pi just by adding 8 sensors. We though that there are some simple way to use inputs ADC0-ADC7 to deal with this (without LED_OFF_ON and battery measurement), because we’d like to keep other stuff (LCD, reading results, buttons) working.

Thanks for advance

Although it might be possible to add that sensors array, it would not be an easy modification to do, and the changes would likely be permanent. You would probably be better off building a new line follower using some of the same parts we use in the 3pi robot (we sell many of them separately), but with a shape better suited to fast line following. A simple Internet search for “Winning line follower” should give you some ideas about what might work best.