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
Revision 13:4016c362b0d5, committed 2014-05-21
- Comitter:
- mmpeter
- Date:
- Wed May 21 11:58:27 2014 +0000
- Parent:
- 12:6b5dd9e5469c
- Child:
- 14:7ddbd9f475ad
- Commit message:
- k=0.9 with timer
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed May 21 11:49:47 2014 +0000
+++ b/main.cpp Wed May 21 11:58:27 2014 +0000
@@ -8,8 +8,8 @@
float speed = 0.5;
float correction;
- float threshold = 0.5;
- float k = -1.5;
+ float k = -0.9;
+
thinggy.locate(0,1);
thinggy.printf("Line Flw");
@@ -19,7 +19,7 @@
thinggy.sensor_auto_calibrate();
while(1) {
-
+ wait(0.05);
// -1.0 is far left, 1.0 is far right, 0.0 in the middle
float position = thinggy.line_position();
correction = k*(position);
@@ -41,6 +41,7 @@
}
-
+
+
}
}
\ No newline at end of file
