Hello world program that just gets the m3pi moving

Dependencies:   mbed m3pi

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Fri May 13 10:51:57 2011 +0000
Parent:
6:602fc2239837
Commit message:

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
diff -r 602fc2239837 -r d0689e8f23bf m3pi.lib
--- a/m3pi.lib	Wed Nov 10 09:07:39 2010 +0000
+++ b/m3pi.lib	Fri May 13 10:51:57 2011 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/chris/code/m3pi/#62ee1486ecb9
+http://mbed.org/users/chris/code/m3pi/#4b7d6ea9b35b
diff -r 602fc2239837 -r d0689e8f23bf main.cpp
--- a/main.cpp	Wed Nov 10 09:07:39 2010 +0000
+++ b/main.cpp	Fri May 13 10:51:57 2011 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 #include "m3pi.h"
 
-m3pi m3pi(p23,p9,p10);
+m3pi m3pi;
 
 int main() {
 
@@ -11,14 +11,13 @@
     wait (2.0);
 
     m3pi.forward(0.5); // Forward half speed
-    wait (0.5);        // For half a second
-    m3pi.left(0.5);
-    wait (0.5);
-    m3pi.backward(0.5);
-    wait (0.5);
-    m3pi.right(0.5);
-    wait (0.5);
+    wait (0.5);        // wait half a second
+    m3pi.left(0.5);    // Turn left at half speed
+    wait (0.5);        // wait half a second
+    m3pi.backward(0.5);// Backward at half speed 
+    wait (0.5);        // wait half a second
+    m3pi.right(0.5);   // Turn right at half speed
+    wait (0.5);        // wait half a second
 
-    m3pi.stop();
-
+    m3pi.stop();       
 }
\ No newline at end of file