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

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

Revision:
13:711f74b2fa33
Parent:
12:6cd135bf03bd
Child:
14:522bb06f0f0d
--- a/main.cpp	Sun Feb 03 04:53:44 2013 +0000
+++ b/main.cpp	Sun Feb 03 21:22:21 2013 +0000
@@ -5,10 +5,11 @@
 uint16_t data[0x2000] __attribute__((section("AHBSRAM1"))); //motion data area
 Ticker tick;    //Ticker for main control roop
 
+
 int main(void)
 {  
-    unsigned short int size_x = 25;    //max about 25kb
-    unsigned short int size_y = 400;
+    /*unsigned short int size_x = 25;    //max about 25kb
+    unsigned short int size_y = 5;
     
     uint16_t **array = new uint16_t*[size_x];
     for (int i = 0; i < size_y; ++i) {
@@ -16,25 +17,23 @@
     }
     for (int i = 0; i < size_y; ++i) {
         for (int j = 0; j < size_x; ++j) {
-            array[i][j] = 900 + 2*i;
+            array[i][j] = 900 + 200*i;
         }
     }
     for (int i = 0; i < size_y; ++i) {
-        array[i][size_x - 1] = 1;
+        array[i][size_x - 1] = 50;
     }
     
-    Motion inter0(array, size_y, size_x);
-    //int data[256];
-    //CSV csv;
-    //csv.readCSV("data.csv", data);
+    Motion inter0(array, size_y, size_x);*/
     
-    //Motions motions(data);
+    Motions motions(data);
+    //motions.setmotion(0);
     
     while (1) {
-        //motions.control();
-        if (!inter0.is_in_interrupt()) {
-            tick.attach(&inter0, &Motion::step, 0.02);
-        }
-        wait(5);
+        motions.control();
+        //if (!inter0.is_in_interrupt()) {
+            //tick.attach(&inter0, &Motion::step, 0.02);
+        //}
+        wait(0.05);
     }
 }
\ No newline at end of file