k

Dependencies:   m3pi mbed

Fork of m3pi_HelloWorld by Chris Styles

Revision:
8:a6afbbc052e2
Parent:
7:d0689e8f23bf
--- a/main.cpp	Fri May 13 10:51:57 2011 +0000
+++ b/main.cpp	Wed Apr 19 09:51:15 2017 +0000
@@ -1,23 +1,15 @@
 #include "mbed.h"
 #include "m3pi.h"
-
-m3pi m3pi;
+#include "Controller.h"
+#include "Receiver.h"
+Controller ctrl;
+Receiver recv;
 
 int main() {
-
-    m3pi.locate(0,1);
-    m3pi.printf("LO World");
-
-    wait (2.0);
-
-    m3pi.forward(0.5); // Forward half speed
-    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();       
+while(true){
+  char test[4] = {1,0,0,1}; 
+    float test2 = recv.convertBitsToFloat(test);
+    printf("%.2f, test", test2);
+    wait_ms(1000);
+    }
 }
\ No newline at end of file