Pololu Zumo Shield Arduino Library
|
37 #define QTR_EMITTERS_OFF 0
38 #define QTR_EMITTERS_ON 1
39 #define QTR_EMITTERS_ON_AND_OFF 2
41 #define QTR_NO_EMITTER_PIN 255
43 #define QTR_MAX_SENSORS 16
66 void read(
unsigned int *sensor_values,
unsigned char readMode = QTR_EMITTERS_ON);
79 void calibrate(
unsigned char readMode = QTR_EMITTERS_ON);
89 void readCalibrated(
unsigned int *sensor_values,
unsigned char readMode = QTR_EMITTERS_ON);
110 int readLine(
unsigned int *sensor_values,
unsigned char readMode = QTR_EMITTERS_ON,
unsigned char white_line = 0);
138 void init(
unsigned char *pins,
unsigned char numSensors,
unsigned char emitterPin);
140 unsigned char *_pins;
141 unsigned char _numSensors;
142 unsigned char _emitterPin;
143 unsigned int _maxValue;
148 virtual void readPrivate(
unsigned int *sensor_values) = 0;
153 void calibrateOnOrOff(
unsigned int **calibratedMinimum,
154 unsigned int **calibratedMaximum,
155 unsigned char readMode);
170 QTRSensorsRC(
unsigned char* pins,
unsigned char numSensors,
171 unsigned int timeout = 4000,
unsigned char emitterPin = 255);
193 void init(
unsigned char* pins,
unsigned char numSensors,
194 unsigned int timeout = 2000,
unsigned char emitterPin = QTR_NO_EMITTER_PIN);
206 void readPrivate(
unsigned int *sensor_values);
222 unsigned char numSensors,
unsigned char numSamplesPerSensor = 4,
223 unsigned char emitterPin = 255);
248 void init(
unsigned char* analogPins,
unsigned char numSensors,
249 unsigned char numSamplesPerSensor = 4,
unsigned char emitterPin = QTR_NO_EMITTER_PIN);
263 void readPrivate(
unsigned int *sensor_values);
265 unsigned char _numSamplesPerSensor;
void emittersOn()
Turns the IR LEDs on.
unsigned int * calibratedMaximumOn
The calibrated maximum values measured for each sensor, with emitters on.
void emittersOff()
Turns the IR LEDs off.
void readCalibrated(unsigned int *sensor_values, unsigned char readMode=QTR_EMITTERS_ON)
Returns sensor readings normalized to values between 0 and 1000.
void resetCalibration()
Resets all calibration that has been done.
unsigned int * calibratedMaximumOff
The calibrated maximum values measured for each sensor, with emitters off.
unsigned int * calibratedMinimumOn
The calibrated minimum values measured for each sensor, with emitters on.
void calibrate(unsigned char readMode=QTR_EMITTERS_ON)
Reads the sensors for calibration.
unsigned int * calibratedMinimumOff
The calibrated minimum values measured for each sensor, with emitters off.
int readLine(unsigned int *sensor_values, unsigned char readMode=QTR_EMITTERS_ON, unsigned char white_line=0)
Returns an estimated position of a line under the sensor array.