BOUDEY Ahmed
/
FS_MBED_Cmd
Diff: main.cpp
- Revision:
- 0:f599a3a00b84
- Child:
- 1:3d38f66d6cdc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Mar 03 15:34:30 2015 +0000 @@ -0,0 +1,30 @@ +#include "mbed.h" +Serial FsPC(USBTX,USBRX); +DigitalOut myled(LED1); + +int main() { + FsPC.baud(19200); + //--------------- + //unsigned short hh,mm,ss; + unsigned short ENG1_Throttle_lever,ENG1_Starter_Switch; + unsigned short Elevator_position,Alieron_position,Rudder_position; + + hh = 10; //0-->23 + mm = 0; //0-->59 + ss = 0; //0-->59 + ENG1_Throttle_lever = 0; //0=000% + ENG1_Starter_Switch = 0; //0=Off 1=On + Elevator_position = 50; //0=min, 50=Null, 100=max + Alieron_position = 50; //0=min, 50=Null, 100=max + Rudder_position = 50; //0=min, 50=Null, 100=max + + while(1) { + FsPC.printf("$FSUIPC,%3u,%3u%,%3u,%3u,%3u\n\r",ENG1_Throttle_lever,ENG1_Starter_Switch,Elevator_position,Alieron_position,Rudder_position); + + //wait(0.5); + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + } +}