8 replies
Jan '14

lumi

Pretty good tutorial. That

Pretty good tutorial. That reminds me that I need to dig into the PID a bit more to get some applications running.

1 reply
Jan '14 ▶ lumi

enigmerald

Thanks Lumi. Can’t wait to

Thanks Lumi. Can’t wait to see what you come up with!

1 reply
Jan '14 ▶ enigmerald

lumi

LOL, it will perhaps happen

LOL, it will perhaps happen this year :slight_smile: So many plans and so little time.

Oct '14

indrekm

Really good tutorial!

Hi

How behaves your robot in case of  90 degree angle? Radius of angle is 0.

Is the robot able to follow the line.

Best regards.

 

1 reply
Feb '15 ▶ indrekm

enigmerald

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.

Apr '15

benbruder

Kp and Kd constants

Kp = 0.2 and Kd = 5 worked for me as constants!

Mar '17

pfulton1989

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?

Sep '19

RIYADH1103

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.