IMU and knee angle. No servo yet

Dependencies:   mbed

Fork of FYDP_Final2 by Dave Lu

Revision:
10:22c44650c7c1
Parent:
9:7a8fb72f9a93
Child:
11:425dff6a4af9
--- a/main.cpp	Wed Mar 25 14:34:23 2015 +0000
+++ b/main.cpp	Wed Mar 25 16:36:11 2015 +0000
@@ -9,11 +9,6 @@
 Sensor sensor;
 DigitalOut btSwitch(PTE30);
 
-void motor_t(void const *args)
-{
-//    myservo = 0;
-}
-
 void IMU2_thread(void const *args)
 {
     test_dmp2();
@@ -27,9 +22,11 @@
 {
     test_dmp();
     start_dmp(mpu);
-
+    test_dmp2();
+    start_dmp2(mpu2);
     while(1) {
         update_dmp();
+        update_dmp2();
         Thread::yield();
     }
 }
@@ -48,14 +45,23 @@
         
         process();
         
-        pc.printf(
-            "%.3f;%.3f;%.3f;%i;%.3f;%.3f;%.3f;\r\n", 
-            sensor.time(), sensor.thigh(), sensor.shin(), getState(), getPace(), 0, 0
-        );
+//        pc.printf(
+//            "%.3f;%.3f;%.3f;%i;%.3f;%.3f;%.3f;\r\n", 
+//            sensor.time(), sensor.thigh(), sensor.shin(), getState(), getPace(), 0, 0
+//        );
+        pc.printf("crap\r\n", 0);
         Thread::wait(10);
     }
 }
 
+//void control_thread(void const *args)
+//{
+//    while(true) {
+//        process();
+//        Thread::wait(10);
+//    }
+//}
+
 int main()
 {
     t.start();
@@ -63,7 +69,7 @@
     Thread bt_shell_th(io_thread, NULL, osPriorityNormal, 2048, NULL);
     Thread IMU_th(IMU_thread, NULL, osPriorityNormal, 2048, NULL);
     Thread IMU2_th(IMU2_thread, NULL, osPriorityNormal, 2048, NULL);
-    Thread motor_th(motor_t, NULL, osPriorityNormal, 2048, NULL);
+//    Thread control_th(control_thread, NULL, osPriorityNormal, 2548, NULL);
 
     Thread::wait(osWaitForever);
 }
\ No newline at end of file