Latest Bluetooth transmission from mbedLPC1768 & HP-05 working with android phone

Dependencies:   mbed

Revision:
0:2df416fa994c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Mar 31 02:42:27 2018 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX);
+Serial blue(p9, p10);          // TX, RX
+
+DigitalOut pcLED(LED1);
+DigitalOut blueLED(LED4);
+
+int main()
+{
+    pc.baud(9600);
+    blue.baud(9600);
+ 
+//    blue.printf("\n\nBluetooth Communication Stared!\n\n");
+    
+    int x = 0;
+    while(1)
+    {
+        if(pc.readable())
+        {
+            pcLED = !pcLED;
+        }
+        if(blue.readable())
+        {
+            blueLED = !blueLED;
+            pc.printf("Read character %c\n",blue.getc());  
+        }
+        
+        pc.printf("Printing to serial: %d\n",x);
+        blue.printf("Printing to blue: %d\n",x);
+        
+        x+=1;
+        
+        wait(0.5);
+    }    
+}