Six crescent shaped legs

Dependencies:   mbed

Revision:
34:30391b6c26fc
Parent:
33:ad2ebe22f8dd
Child:
35:bce9ac485178
--- a/main.cpp	Fri May 27 05:57:29 2016 +0000
+++ b/main.cpp	Thu Jun 02 14:15:10 2016 +0000
@@ -91,27 +91,24 @@
     
     float volatile rot, speed;
     
-    speed = 1.0;
+    speed = 0.0;
     
     while(1)
-    {
+    {/*
         int oldactive = active;
-        pc.scanf("%d", &active);//, speed);
-        if (active == 0){
-            speed = speed * (-1);
-            active = oldactive;
+        pc.scanf("%d %f", &active, &speed);
+        //active--;
+        if (active != oldactive){
+            ms[oldactive]->drive(0);
             }
-        else{
-            active--;
-            ms[oldactive]->drive(0);
-            ms[active]->drive(speed);
-        }
+        ms[active]->drive(speed);
+        */
         //info enkoodritelt
-        /*
+        
         for (int i = 0; i < MOTORS; i++)
             pc.printf("%ld ", ms[i]->encoder.getCount());
         pc.printf("\n");
-        */
+        
         /*
         //info IRidelt
         for (int i = 0; i < MOTORS; i++)