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.
main.cpp
- Committer:
- cstevens
- Date:
- 2016-06-07
- Revision:
- 0:1f45dc9df1af
File content as of revision 0:1f45dc9df1af:
#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); } } }