Six crescent shaped legs

Dependencies:   mbed

Revision:
19:f21eb090a830
Parent:
13:dc5f5f19e4e8
Child:
22:bfc79c6ea2fd
diff -r 1437610bea8b -r f21eb090a830 main.cpp
--- a/main.cpp	Thu Apr 14 09:34:28 2016 +0000
+++ b/main.cpp	Thu Apr 14 11:00:11 2016 +0000
@@ -1,15 +1,18 @@
 #include "mbed.h"
 #include "EncoderMotor.hpp"
+#include "SyncGroup.hpp"
 
 InterruptIn bt(USER_BUTTON);
 Serial pc(USBTX, USBRX);
 
+PIDData speedPIDData = {0.3f, 2.0f, 0.02f};
+PIDData turnPIDData = {5.0f, 0.1f, 0.04f};
+SyncGroup sync;
+
 MotorData mData = {PB_0, PC_1, PC_0};
 EncoderData encData = {PA_0, PA_1, 600};
-PIDData speedPIDData = {0.3f, 2.0f, 0.02f};
-PIDData turnPIDData = {5.0f, 0.1f, 0.04f};
 
-EncoderMotor m(mData, encData, speedPIDData, turnPIDData);
+EncoderMotor m(mData, encData, speedPIDData, turnPIDData, &sync);
 
 //PIDController ec(0.2, 0.1, 0.01);
 // PIDController ec(0.3, 2.0, 0.02);
@@ -36,18 +39,10 @@
     bt.rise(&rise);
     bt.fall(&fall);
     
-    //m.setup();
-    
-    float rot;
+    m.setup();
     
     while(1)
     {
-        //pc.printf("%d\n", e.getCount());
         wait(0.1);
-        //pc.scanf("%f %f %f", &ec.Kp, &ec.Ki, &ec.Kd);
-        //pc.scanf("%f %f %f %f", &ecRot.Kp, &ecRot.Ki, &ecRot.Kd, &rot);
-        
-        //pc.scanf("%f", &rot);
-        //m.rotate(rot);
     }
 }
\ No newline at end of file