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.
Dependencies: SensoryTest
Fork of btbee by
Diff: main.cpp
- Revision:
- 9:6ae4359b73df
- Parent:
- 8:fd8a30a6923d
- Child:
- 10:7ef481d28dcd
diff -r fd8a30a6923d -r 6ae4359b73df main.cpp
--- a/main.cpp Tue May 20 13:36:31 2014 +0000
+++ b/main.cpp Tue May 20 13:53:38 2014 +0000
@@ -7,7 +7,10 @@
int main() {
float speed = 0.1;
- float threshold = 0.01;
+ float threshold = 0.1;
+
+ thinggy.locate(0,1);
+ thinggy.printf("Line Flw");
wait(2.0);
@@ -19,12 +22,12 @@
// Line is more than the threshold to the right, slow the left motor
if (position > threshold) {
thinggy.right(speed);
-
+
}
// Line is more than 50% to the left, slow the right motor
else if (position < -threshold) {
- thinggy.left(speed);
+ thinggy.left_motor(speed);
}
