Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.
Dependencies: Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed
main.cpp
- Committer:
- syundo0730
- Date:
- 2012-09-22
- Revision:
- 10:be8b10e54ecb
- Parent:
- 9:d9ce965299d2
- Child:
- 11:1539d181e159
File content as of revision 10:be8b10e54ecb:
#include "LPC17xx.h" #include "mbed.h" #include "PWM.h" #include "Motion.h" Ticker tick; PWM pwm; int main(void) { unsigned char size_x = 4, size_y = 24; uint32_t **array = new uint32_t*[size_x]; for (int i = 0; i < size_x; ++i) { array[i] = new uint32_t[size_y]; } for (int i = 0; i < size_x; ++i) { for (int j = 0; j < size_y; ++j) { array[i][j] = 900 + 300 * i; } } array[0][size_y - 1] = 50; array[1][size_y - 1] = 50; array[2][size_y - 1] = 50; array[3][size_y - 1] = 50; Motion inter0(array, size_x, size_y); //tick.attach(&inter0, &Motion::step, 0.02); while (1) { //int id = 0; if (!inter0.is_in_interrupt()) { tick.attach(&inter0, &Motion::step, 0.02); } wait(0.02); } }