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

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

Source3.cpp

Committer:
syundo0730
Date:
2012-09-18
Revision:
7:7c0621d33781
Parent:
5:0ca9f1bc1fb0

File content as of revision 7:7c0621d33781:

#include "LPC17xx.h"
#include "mbed.h"
#include "pwm.h"

Ticker flip;
void main_th(void);

extern volatile uint8_t SRV_Idx;
extern volatile uint32_t SRV_dutyTable[SRV_BANK_NUM][SRV_IDX_NUM];

int main(void) {
    
    for(int i = 0; i < SRV_CH_NUM; i++)
    {
        SetDuty(i, (SRV_MAX_DUTY + SRV_MIN_DUTY) / 2);
    }
    
    Init_PWM();
    flip.attach(&main_th,5.0);
    
    while (1) {
        //SetDuty(1,SRV_MAX_DUTY);
        //sleep();
    }
}

void main_th(void) {
    SetDuty(1,0);
}