22

Dependencies:   mbed

Fork of StewartPlatform by Guojun Jiang

main.cpp

Committer:
zjyporridge
Date:
2016-05-31
Revision:
3:0cba1132c8a3
Parent:
2:50062ac8646d

File content as of revision 3:0cba1132c8a3:

#include "mbed.h"
#include "motor.h"
#include "usart.h"
//#include "file.h"


//extern PwmOut motor[6];
extern Serial usart;

extern char position[6];

extern bool instructionReceived;

int main() {
        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();
        }
    }
}