Pololu QTR-8A

Hello Everyone,

I am having trouble understanding the directions for using the Pololu QTR library. I recently bought the Pololu QTR-8A sensor. I can use the Examples and they work. How do i read the independent sensors and is there any line following functions that i can use.

I am trying to build a line following robot. Has anyone else done this with these sensors, if so can I see the portion of the code to check sensors conditions?

Thank You.

Hello Jordan.

What microcontroller are you using? If you are using an Arduino or one of our Orangutan boards, have you read through the “QTR Reflectance Sensors” section of our AVR Library Command Reference? Since you are making a line follower, the “readLine()” or “qtr_read_line()” function is probably the most useful and easiest function to use. To read individual sensors, you could use the “read()” or “qtr_read()” command and reference the array at the index of the desired sensor. Even if you are using a different microcontroller, these might be good references for you to start with.

This sensor array, along with the QTR-8RC sensor array, is commonly used in line following robots. One example that is linked to from the QTR-8A product page is the “Robot Zero”.

While the Zumo Shield Arduino library uses slightly different functions and a different sensor array, the premise is the same. If you are looking for examples of line followers, you might try looking through the “LineFollower.ino” sample code to base your own code off of.

Alternatively, you can probably find other examples by searching around on this forum for other related posts.