VNGIoTLab / Mbed 2 deprecated vbluno51_mbed_serial

Dependencies:   mbed

Revision:
0:4b3db0a05c69
Child:
1:cd16195807ca
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Oct 15 16:31:53 2017 +0000
@@ -0,0 +1,29 @@
+/*
+ * Note: Use fw_daplink_vbluno51_release_1.0.1.bin or later version for 
+ * DAPLINK interface on the VBLUNO51 kit.
+ */
+ 
+#include "mbed.h"
+
+/*For the VBLUno51 board*/
+#define PIN_TX  p10
+#define PIN_RX  p11
+#define PIN_LED p7
+ 
+DigitalOut led(PIN_LED);
+Serial pc(PIN_TX, PIN_RX, 115200);
+
+int main(void) {        
+    
+    pc.printf("VBLUno51: Test Serial communication.\n");        
+    
+    led = 1;
+                           
+    //No condition loop    
+    while(1) {
+        if(pc.readable()) {
+            pc.putc(pc.getc() + 1); // echo input back to terminal
+            led = !led;
+        }    
+    }
+}