![](/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@23:0927e605af4b, 2013-11-22 (annotated)
- Committer:
- syundo0730
- Date:
- Fri Nov 22 00:30:42 2013 +0000
- Revision:
- 23:0927e605af4b
- Parent:
- 22:bf5aa20b9df0
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
syundo0730 | 0:d114194bff43 | 1 | #include "LPC17xx.h" |
syundo0730 | 0:d114194bff43 | 2 | #include "mbed.h" |
syundo0730 | 20:abb7852df747 | 3 | #include "Controlor.h" |
syundo0730 | 15:e37a8c413e51 | 4 | #include "PWM.h" |
syundo0730 | 23:0927e605af4b | 5 | //#include "rtos.h" |
syundo0730 | 0:d114194bff43 | 6 | |
syundo0730 | 12:6cd135bf03bd | 7 | uint16_t data[0x2000] __attribute__((section("AHBSRAM1"))); //motion data area |
syundo0730 | 17:60de3bfdc70b | 8 | |
syundo0730 | 17:60de3bfdc70b | 9 | DigitalOut led1(LED1); |
syundo0730 | 5:0ca9f1bc1fb0 | 10 | |
syundo0730 | 23:0927e605af4b | 11 | Ticker tick; |
syundo0730 | 23:0927e605af4b | 12 | |
syundo0730 | 8:72b4a248d469 | 13 | int main(void) |
syundo0730 | 16:e65c192b7ecf | 14 | { |
syundo0730 | 20:abb7852df747 | 15 | Controlor controlor(data); |
syundo0730 | 15:e37a8c413e51 | 16 | |
syundo0730 | 23:0927e605af4b | 17 | tick.attach(&controlor, &Controlor::control, 0.01); |
syundo0730 | 23:0927e605af4b | 18 | |
syundo0730 | 5:0ca9f1bc1fb0 | 19 | while (1) { |
syundo0730 | 23:0927e605af4b | 20 | //controlor.control(); |
syundo0730 | 23:0927e605af4b | 21 | //wait(0.01); |
syundo0730 | 23:0927e605af4b | 22 | //Thread::wait(5); |
syundo0730 | 23:0927e605af4b | 23 | //led1 = !led1; |
syundo0730 | 5:0ca9f1bc1fb0 | 24 | } |
syundo0730 | 23:0927e605af4b | 25 | } |