simple test prog for the esp8266 dongles

Dependencies:   mbed

This is a simple version of the serial passthrough test code for the esp8266 connected to an LPC1768 mbed. /media/uploads/cstevens/xesp8266.jpg.pagespeed.ic.n1e5_ap8ja.jpg

Revision:
0:1f45dc9df1af
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jun 07 19:59:11 2016 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX); // tx, rx
+Serial esp(PTA2,PTA1);
+
+int main()
+{
+    pc.baud(115200);
+    int i=0;
+    char c;
+    while(1) {
+        // pc.printf("Hello World! %d\n\r",i++);
+        //wait(0.5);
+        if(pc.readable()) {
+            c=pc.getc();
+            pc.putc(c);
+            esp.putc(c);
+        }
+        if(esp.readable()) {
+            c=esp.getc();
+            pc.putc(c);
+
+
+        }
+    }
+}
\ No newline at end of file