joystick

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 Serial bt1(PA_0, PD_0);
00003 Serial bt2(PC_12, PD_2);
00004 void rxData(){
00005     char temp = bt2.getc();
00006     bt1.putc(temp);            //convention
00007 }
00008 int main(){
00009     bt2.baud(115200);
00010     bt1.baud(115200);
00011     bt2.attach(&rxData, Serial::RxIrq);
00012     while(1)
00013     {
00014         
00015   //  long int c = 0xFF;
00016     }
00017     //   int output1 = (int)pc.putc(buffer[1006]);
00018      //  int output2 = (int)pc.putc(buffer[1007]);
00019      //  printf("%d %d\r\n", output1, output2);
00020      //  wait(1);
00021 }