jy z
/
StewartPlatform
22
Fork of StewartPlatform by
Diff: main.cpp
- Revision:
- 2:50062ac8646d
- Parent:
- 1:5160ea45399b
- Child:
- 3:0cba1132c8a3
--- a/main.cpp Sun Sep 21 06:39:30 2014 +0000 +++ b/main.cpp Sat May 07 12:27:09 2016 +0000 @@ -1,12 +1,27 @@ #include "mbed.h" +//#include "motor.h" +#include "usart.h" +//#include "file.h" + -PwmOut led(LED1); +//extern PwmOut motor[6]; +extern Serial usart; + +extern char position[6]; +extern bool instructionReceived; int main() { - // specify period first - led.period(4.0f); // 4 second period - led.write(0.50f); // 50% duty cycle, relative to period - //led = 0.5f; // shorthand for led.write() - //led.pulsewidth(2); // alternative to led.write, set duty cycle time in seconds - while(1); -} \ No newline at end of file + int baud = 9600; //baud rate + usart_init(baud); //serial port initialize +// motor_init(); + usart.printf("new test!"); + + while(1) { + if (instructionReceived) { + instructionReceived = false; + usart.printf("0 \n" ); + //usart.printf("pos(%d,%d,%d,%d,%d,%d) \n", position[0], position[1], position[2], position[3], position[4], position[5]); +// motor_drive(); + } + } +}