stewartplatform

Dependencies:   mbed

Fork of PwmOut_HelloWorld by Mbed

main.cpp

Committer:
wheels
Date:
2016-08-20
Revision:
3:c5ea5b6a7460
Parent:
2:50062ac8646d

File content as of revision 3:c5ea5b6a7460:

#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();
        }
    }
}