joystick

Dependencies:   mbed

Revision:
0:f998f1345a11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Sep 20 03:54:31 2019 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+Serial bt1(PA_0, PD_0);
+Serial bt2(PC_12, PD_2);
+void rxData(){
+    char temp = bt2.getc();
+    bt1.putc(temp);            //convention
+}
+int main(){
+    bt2.baud(115200);
+    bt1.baud(115200);
+    bt2.attach(&rxData, Serial::RxIrq);
+    while(1)
+    {
+        
+  //  long int c = 0xFF;
+    }
+    //   int output1 = (int)pc.putc(buffer[1006]);
+     //  int output2 = (int)pc.putc(buffer[1007]);
+     //  printf("%d %d\r\n", output1, output2);
+     //  wait(1);
+}
\ No newline at end of file