IT GOES NORTH MOST OF THE TIME

Dependencies:   HMC6352 Motor mbed

Revision:
0:1a0fa585e36c
Child:
1:6812f830e5a1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 02 19:33:05 2012 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "Motor.h"
+
+Motor right(p21, p23, p22); // pwm, fwd, rev
+Motor left(p26, p24, p25); // pwm, fwd, rev
+
+int main() {
+    while (1){
+        for (float s= -1.0; s < 1.0 ; s += 0.01) {
+           right.speed(s); 
+           left.speed(s);
+           wait(0.02);
+        }        
+        for (float s= 1.0; s > -1.0 ; s -= 0.01) {
+           right.speed(s); 
+           left.speed(s);
+           wait(0.02);
+        }
+    }
+}