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);
82 void resetCalibration();
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);
124 unsigned int *calibratedMinimumOn;
125 unsigned int *calibratedMaximumOn;
126 unsigned int *calibratedMinimumOff;
127 unsigned int *calibratedMaximumOff;
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;