A simple line following program

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Wed Nov 10 09:05:50 2010 +0000
Parent:
4:93843695a895
Child:
6:8f46c6ac55ca
Commit message:
Updated to latest m3pi library

Changed in this revision

m3pi.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/m3pi.lib	Sun Nov 07 10:52:21 2010 +0000
+++ b/m3pi.lib	Wed Nov 10 09:05:50 2010 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/chris/code/m3pi/#09fb0636207b
+http://mbed.org/users/chris/code/m3pi/#62ee1486ecb9
--- a/main.cpp	Sun Nov 07 10:52:21 2010 +0000
+++ b/main.cpp	Wed Nov 10 09:05:50 2010 +0000
@@ -6,10 +6,11 @@
 
 int main() {
 
-
     m3pi.locate(0,1);
     m3pi.printf("Line Flw");
 
+    wait(2.0);
+
     float position_of_line = 0.0;
     m3pi.sensor_auto_calibrate();
     float speed = 0.4;
@@ -31,7 +32,7 @@
             m3pi.left_motor(speed - 0.3);
             leds = 0x2;
         }
-        // Line is inthe middle
+        // Line is in the middle
         else {
             m3pi.forward(speed);
             leds = 0x0;