Maximum sensors (QTRXL)

We are attempting to use multiple individual Pololu QTRXL-MD-01RC reflectance sensors in a custom array for a robotics application. Our current array is 20 sensors in length. Comments in the Arduino library code specify a maximum of 16 sensors, but that seems specific to calibration. In fact calibrateOnOrOff hardwires 16 into the length of the min/max calibration arrays.

The library itself defines QTR_MAX_SENSORS at 31 sensors (matching the 31-sensor array that Pololu sells). If you can define up to 31 sensors, shouldn’t you be able to calibrate them as well?

Is there some actual reason why calibration can’t work for more than 16 sensors? Any problem with just changing that hardwired values in the calibration code?

Thanks for any and all input.

Hello.

Good catch! We are currently in the process of rewriting that library and will make sure that it is fixed in the future update. Also, there should be no issue in changing the hardwired values in the calibration code.

-Tony

Great Tony. Thanks!