PID linefollower without a line


I’ve used the PID line following code of the pololu 3pi examples and changed it a little bit.
At the moment it follows a white line on a black surface and I adjusted all the PID values.
Following the line is one thing. There is also an interrupted line (a straight line of 35 cm without a white line).
After these 35cm the car should start again following his line. The problem is that the car needs to know when he should drive forward with both motors at the same speed or if he needs to correct with the PID code.
I have really no idea how to solve this. Is there someone with some idea’s ?


The line interruption will mean that all of the line sensors will be seeing black, right? If you detect that, command the 3pi to go straight, otherwise command it to do your PID code. Try looking at the read_line_sensors function.

- Ryan