3Pi source files

I want to modify some of the functions included with the 3Pi software bundle.

I first wanted to change the read_line function, so that instead of two functions for light and dark lines, I could make a third parameter specifying the shade of the line. However, I can’t seem to find the files that define this stuff. Could somebody please point me in the right direction? Thank you.

I am using the most recent library. If you go to libpololu-avr/src/PololuQTRSensors/PololuQTRSensors.cpp you can see the source code. You should notice that the way the source code works is to assume the line is dark-on-light and then following the darker part. It is comparative. I don’t think you can specify a particular “shade” to follow. If you want it to follow light-on-dark, you change a parameter in the code.

Thank you, but that’s not what I was looking for. I want the files that define the functions specific to the 3Pi. The files where it actually defines the commands read_line and read_line_white so that I can combine them into one.

If you follow the path libpololu-avr/src/Pololu3pi/Pololu3pi.cpp, you’ll see that the 3pi uses the QTR sensor source code for controlling the ir sensors (as referenced in the #include). The functions read_line() and read_line_white() call the function readline() found in PololuQTRSensors.cpp. In the version I’m looking at, this function is on line 418.