QTRSensors library
|
Version: 4.0.0
Release date: 2019-03-15
www.pololu.com
This is a library for the Arduino IDE that helps interface with Pololu QTR reflectance sensors.
This library is designed to work with the Arduino IDE versions 1.8.x or later; we have not tested it with earlier versions. This library should support any Arduino-compatible board, including the Pololu A-Star controllers.
The QTRSensors library supports Pololu's second-generation dimmable QTR and QTRX reflectance sensor boards, as well as older QTR sensors. Before continuing, careful reading of the QTR Reflectance Sensor Application Note is recommended.
This library also works with the reflectance sensors built into or designed for Pololu robots, such as the Zumo 32U4 Front Sensor Array. However, the dedicated libraries for those robots (e.g. the Zumo32U4 library) generally provide an interface that is specific to those sensors and is easier to use.
You can use the Library Manager to install this library:
If this does not work, you can manually install the library:
Several example sketches are available that show how to use the library. You can access them from the Arduino IDE by opening the "File" menu, selecting "Examples", and then selecting "QTRSensors". If you cannot find these examples, the library was probably installed incorrectly and you should retry the installation instructions above.
For complete documentation of this library, see the qtr-sensors-arduino documentation. If you are already on that page, see the QTRSensors class reference and Usage Notes.
QTRSensors
class, and instances of this class can be configured for a specific sensor type. Configuration of sensor pins and other settings is now done using more human-readable class methods instead of constructor parameters. Support for calibration using the odd/even read modes has been added.readLine()
behavior to work with multiple instances (thanks to Tandy Carmichael).read()
behavior and whitespace cleanup.