QTRSensorsRC qtrrc((unsigned char[]) { 14, 15, 16, 17, 18, 19} ,NUM_SENSORS, TIMEOUT, EMITTER_PIN);
My code is not running because of this line. it says-
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: “Arduino/Genuino Uno”
LFR_QTR_TEST:21:1: error: ‘QTRSensorsRC’ does not name a type
QTRSensorsRC qtrrc((unsigned char[]) { 14, 15, 16, 17, 18} ,NUM_SENSORS, TIMEOUT, EMITTER_PIN);
^
LFR_QTR_TEST:21:61: error: expected unqualified-id before ‘,’ token
QTRSensorsRC qtrrc((unsigned char[]) { 14, 15, 16, 17, 18} ,NUM_SENSORS, TIMEOUT, EMITTER_PIN);
^
LFR_QTR_TEST:8:22: error: expected unqualified-id before numeric constant
#define NUM_SENSORS 5 // number of sensors used
^
D:\Arduino\Tests\LFR_QTR_TEST\LFR_QTR_TEST.ino:21:62: note: in expansion of macro ‘NUM_SENSORS’
QTRSensorsRC qtrrc((unsigned char[]) { 14, 15, 16, 17, 18} ,NUM_SENSORS, TIMEOUT, EMITTER_PIN);
^
D:\Arduino\Tests\LFR_QTR_TEST\LFR_QTR_TEST.ino: In function ‘void loop()’:
LFR_QTR_TEST:47:18: error: ‘qtrrc’ was not declared in this scope
int position = qtrrc.readLine(sensors);
^
D:\Arduino\Tests\LFR_QTR_TEST\LFR_QTR_TEST.ino: In function ‘void manual_calibration()’:
LFR_QTR_TEST:88:5: error: ‘qtrrc’ was not declared in this scope
qtrrc.calibrate(QTR_EMITTERS_ON);
^
LFR_QTR_TEST:88:21: error: ‘QTR_EMITTERS_ON’ was not declared in this scope
qtrrc.calibrate(QTR_EMITTERS_ON);
^
LFR_QTR_TEST:96:20: error: ‘qtrrc’ was not declared in this scope
Serial.print(qtrrc.calibratedMinimumOn[i]);
^
LFR_QTR_TEST:103:20: error: ‘qtrrc’ was not declared in this scope
Serial.print(qtrrc.calibratedMaximumOn[i]);
^
exit status 1
‘QTRSensorsRC’ does not name a type
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.