Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

QTR sensor array center point


with heartfelt respect, i have purchased a POLOLU QTR 8RC to make a line following robot…I’m kind of confused about the measurement of center point and thus to find the error using the center point…
When i’m using 6 sensors then which point may I consider as center? Should it be counted from 0 to 6 or 1 to 6? I tested the example codes earlier which seem to be working fine.

PololuQTRSensor trouble


I moved your post to its own thread since it seems like a separate topic.

From your description, it sounds likes you are using our Arduino QTRSensors library. If so, I suggest reading the readLine function documentation under the “QTRSensors Methods & Usage Notes” section of the Arduino Library for the Pololu QTR Reflectance Sensors guide. The readLine() function returns a value that corresponds to where the line is under the sensor array using a weighted average of the sensor indices multiplied by 1000 (the formula is shown in that section). You should also look at the “Reading the Sensors” part in that section, particularly the comments in the example code, to understand how to compute the error from the line position.

Using 6 sensors of the sensor array, the position value will range from 0 to 5000, and the center value should be half of the total range, which is 2500.

If there is a particular part of that documentation that you find confusing, let me know and I will try to clarify it.

- Amanda