AVR Library Command Reference
Table Of Contents
- Pololu AVR Library Command Reference
- 1. Introduction
- 2. Timing and Delays
- Reference
- 3. Orangutan Analog-to-Digital Conversion
- Reference
- 4. Orangutan Buzzer: Beeps and Music
- Reference
- 5. Orangutan LCD
- Reference
- 6. Orangutan LEDs
- Reference
- 7. Orangutan Motor Control
- Reference
- 8. Orangutan Pushbuttons
- Reference
- 9. Orangutan Serial Port Communication
- Reference
- 10. Orangutan System Resources
- 11. QTR Reflectance Sensors
- Reference
- 12. 3pi Robot Functions
- 13. Wheel Encoders
- Reference
analog input channels (ADC0 – ADC7) that correspond to port C pins PC0 – PC5 and dedicated analog inputs
ADC6 and ADC7.
numSensors specifies the length of the analogPins array (the number of QTR-A sensors you are using).
numSensors must be no greater than 8.
numSamplesPerSensor indicates the number of 10-bit analog samples to average per channel (per sensor) for each
reading. The total number of analog-to-digital conversions performed will be equal to numSensors times
numSamplesPerSensor. Increasing this parameter increases noise suppression at the cost of sample rate.
Recommended value: 4.
emitterPin is the digital pin (see qtr_rc_init(), above) that controls whether the IR LEDs are on or off. This pin is
optional and only exists on the 8A and 8RC QTR sensor arrays. If a valid pin is specified, the emitters will only
be turned on during a reading. If an invalid pin is specified (e.g. 255), the IR emitters will always be on.
Pololu AVR Library Command Reference © 2001–2009 Pololu Corporation
11. QTR Reflectance Sensors Page 30 of 35










