Skip to content

Commit fc64679

Browse files
committed
Fix Simple Example
1 parent 3634064 commit fc64679

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

examples/AutoCalibrate_Simple/AutoCalibrate_Simple.ino

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
/************************
2-
Topic : AutoCalibrate_TrackLine
2+
Topic : AutoCalibrate_Simple
33
Author : Boss (Hudsawat Akkati) @ Friend Robot
44
Website : https://www.friendrobot.co/
55
************************/
6-
#include <ModelPro.h> // motor() function
76
#include <AutoCalibration.h>
87

98
/****************
@@ -16,13 +15,6 @@ int sensorPort[5]={1, 2, 3, 4, 5}; // [Analog Only!] Ports Sensor. Example [A1
1615
// initial our Calibrate method to call AutoCalibrate Class.
1716
AutoCalibrate Calibrate(n_sensor, &sensorPort[0], &reff[0]);
1817

19-
void trackLine() {
20-
if (analogRead(sensorPort[1]) < reff[1] && analogRead(sensorPort[3]) < reff[3]){ fd(30); }
21-
if (analogRead(sensorPort[1]) > reff[1] && analogRead(sensorPort[3]) > reff[3]){ fd(30); }
22-
if (analogRead(sensorPort[1]) < reff[1] && analogRead(sensorPort[3]) > reff[3]){ sl(30); }
23-
if (analogRead(sensorPort[1]) > reff[1] && analogRead(sensorPort[3]) < reff[3]){ sr(30); }
24-
}
25-
2618
void setup() {
2719

2820
Serial.begin(115200);
@@ -45,5 +37,5 @@ void setup() {
4537
}
4638

4739
void loop() {
48-
trackLine();
40+
4941
}

0 commit comments

Comments
 (0)