Dependencies:   mbed Motordriver QEI

main.cpp

Committer:
Keisuke_Fujii
Date:
2011-11-10
Revision:
1:19d647492936
Parent:
0:993cd673f077

File content as of revision 1:19d647492936:

#include "library.h"
#include   "motor.h"
#include   "servo.h"

int main( int argc, char **argv )
{
    char s;
    float d = 0.5;
    
    setSystemFrequency( 0x3, 0x1, 12, 1 ); // M=12, N=1, 96MHz
        
    device.baud( 115200 );
    servo.baud( 115200 );
    led1.period_us( 10 );
    led2.period_us( 10 );
    right_pwm.period_us( 10 );
    left_pwm.period_us( 10 );
    enable.write( 1.0 );
    led1.write( 1.0 );
    led2.write( 1.0 );
    
    device.printf("Start:'0'\n");
    while( s != 0 )
    {
        s = device.getc();
    }
    //control_servo();
    qei();
}