cwm2016
Dependencies: mbed
Fork of SerialPassthroughcjsESP8266 by
Diff: main.cpp
- Revision:
- 10:c97e0ca91eec
- Parent:
- 9:b1344ca3497d
diff -r b1344ca3497d -r c97e0ca91eec main.cpp --- a/main.cpp Wed Jun 08 10:07:11 2016 +0000 +++ b/main.cpp Wed Jun 15 14:06:30 2016 +0000 @@ -5,12 +5,12 @@ */ #include "mbed.h" -RawSerial pc(USBTX, USBRX); // serial terminal for the pc connection -//RawSerial dev(PTE0,PTE1); // for KL25Z... asuming one can't use the PTA1 version which is the stdio -RawSerial dev(p28,p27); // serial uart for connecting to the esp8266 tx,rx NB mbed tx must connect ot esp rx and vice versa +Serial pc(USBTX, USBRX); // serial terminal for the pc connection +Serial dev(PTD3,PTD2); // for KL25Z... asuming one can't use the PTA1 version which is the stdio +//RawSerial dev(p28,p27); // serial uart for connecting to the esp8266 tx,rx NB mbed tx must connect ot esp rx and vice versa DigitalOut led1(LED1); // twp leds DigitalOut led4(LED4); // to allow visual check of bidirectional comms -DigitalOut rst(p26); // single digital pin to drive the esp8266 reset line +DigitalOut rst(PTA13); // single digital pin to drive the esp8266 reset line // subroutine to run anytime a serial interrupt arrives from the device // this basically passes everything thatthe device produces on to the pc terminal screen @@ -42,6 +42,8 @@ int main() { + pc.baud(115200); // NB maybe this should go before this + pc.printf("resetting esp\n\r"); rst=0; wait(1); rst=1; // send the esp8266 reset