This is single way communication with the PC

Dependencies:   mbed

Revision:
1:dad12410fd2d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backup/main_backup.cpp	Wed Dec 28 22:59:38 2016 +0000
@@ -0,0 +1,21 @@
+/*#include "mbed.h"
+ 
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+ uint8_t data;
+Serial pc(USBTX, USBRX);
+ 
+void call() {
+    // Note: you need to actually read from the serial to clear the RX interrupt
+    data = pc.getc();
+    printf("%c\n", data);
+    led2 = !led2;
+}
+ 
+int main() {
+    pc.attach(&call);
+    while (1) {
+        led1 = !led1;
+        wait(0.5);
+    }
+}*/
\ No newline at end of file