Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.

Dependencies:   Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed

Revision:
10:be8b10e54ecb
Parent:
9:d9ce965299d2
Child:
11:1539d181e159
--- a/main.cpp	Sat Sep 22 06:16:15 2012 +0000
+++ b/main.cpp	Sat Sep 22 06:58:21 2012 +0000
@@ -26,25 +26,13 @@
 	
     Motion inter0(array, size_x, size_y);
     
-    tick.attach(&inter0, &Motion::step, 0.02);
+    //tick.attach(&inter0, &Motion::step, 0.02);
     
     while (1) {
-        //SetDuty(1,SRV_MAX_DUTY);
-        //sleep();
-        //__enable_irq();
-        //__disable_irq();
-        //NVIC_DisableIRQ(PWM1_IRQn);
+        //int id = 0;
+        if (!inter0.is_in_interrupt()) {
+            tick.attach(&inter0, &Motion::step, 0.02);
+        }
+        wait(0.02);
     }
-}
-
-/*void main_th(void) {
-    PWM pwm;
-    //const uint32_t center = 1500 - 1;
-    //const uint32_t dif = SRV_MAX_DUTY - center;
-    static uint8_t i;
-    
-    __disable_irq();
-    pwm.SetDuty(1,SRV_MIN_DUTY+i);
-    __enable_irq();
-    ++i;
-}*/
\ No newline at end of file
+}
\ No newline at end of file