22
Fork of StewartPlatform by
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "motor.h" 00003 #include "usart.h" 00004 //#include "file.h" 00005 00006 00007 //extern PwmOut motor[6]; 00008 extern Serial usart; 00009 00010 extern char position[6]; 00011 00012 extern bool instructionReceived; 00013 00014 int main() { 00015 int baud = 9600; //baud rate 00016 usart_init(baud); //serial port initialize 00017 // motor_init(); 00018 usart.printf("new test!"); 00019 00020 while(1) { 00021 if (instructionReceived) { 00022 instructionReceived = false; 00023 usart.printf("0 \n" ); 00024 //usart.printf("pos(%d,%d,%d,%d,%d,%d) \n", position[0], position[1], position[2], position[3], position[4], position[5]); 00025 motor_drive(); 00026 } 00027 } 00028 } 00029
Generated on Mon Jul 25 2022 15:47:41 by
1.7.2
