Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 5:a7949ddab560
- Parent:
- 4:d53cb2045ee8
--- a/main.cpp Tue Nov 19 10:27:17 2019 +0000
+++ b/main.cpp Tue Nov 19 10:30:02 2019 +0000
@@ -63,13 +63,11 @@
// number is negative when the line is to the left. Need to turn left
if (position < -threshold) {
// slow down left, speed up right
- robot.motors(0,speed);
// ADD CODE HERE TO CONTROL MOTORS
}
// number is positive when the line is to the right. Need to turn right
else if (position > threshold) {
// slow down right, speed up left
- robot.motors(speed,0);
// ADD CODE HERE TO CONTROL MOTORS
}
// else over the line