LOL, it will perhaps happen
LOL, it will perhaps happen this year So many plans and so little time.
Hello indrekm.A 90 degree
Hello indrekm.
A 90 degree turn is an extremely sharp turn. The PID parameters need to be tuned to near perfection in order to make a correct turn. But that is rather difficult. So, I suggest you set a 90 degree turn as a “special” case and work out a separate algorithm that varies from the PID routine. A simple “scan” left/right, “turn” left/right should do.
Stopping on a line?
I’m using this sensor for my senior project at my University and was wondering if you knew of a way to have the robot stop if it goes over a solid black line being read by all sensors at once?
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.