![](/media/cache/profiles/e5815151957be36ad2085b7a1a02c5cc.jpg.50x50_q85.jpg)
Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.
Dependencies: Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed
main.cpp
- Committer:
- syundo0730
- Date:
- 2013-02-03
- Revision:
- 12:6cd135bf03bd
- Parent:
- 11:1539d181e159
- Child:
- 13:711f74b2fa33
File content as of revision 12:6cd135bf03bd:
#include "LPC17xx.h" #include "mbed.h" #include "Motions.h" 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; uint16_t **array = new uint16_t*[size_x]; for (int i = 0; i < size_y; ++i) { array[i] = new uint16_t[size_x]; } for (int i = 0; i < size_y; ++i) { for (int j = 0; j < size_x; ++j) { array[i][j] = 900 + 2*i; } } for (int i = 0; i < size_y; ++i) { array[i][size_x - 1] = 1; } Motion inter0(array, size_y, size_x); //int data[256]; //CSV csv; //csv.readCSV("data.csv", data); //Motions motions(data); while (1) { //motions.control(); if (!inter0.is_in_interrupt()) { tick.attach(&inter0, &Motion::step, 0.02); } wait(5); } }