Adafruit FONA 800H breakout
Dependencies: mbed
Diff: main.cpp
- Revision:
- 2:aaef20ac9044
- Parent:
- 1:dba6dedf6cd3
--- a/main.cpp Thu Mar 10 05:52:15 2016 +0000 +++ b/main.cpp Thu Mar 10 01:53:00 2016 -0500 @@ -108,12 +108,14 @@ while (true) { pcSerial.printf("FONA> "); + // if nothing is available on the pcSearial port but there is something on the fona serial, then print it (flush it) to the pc Serial while (! pcSerial.readable() ) { if (fona.readable()) { pcSerial.putc(fona.getc()); } } + // get the input command from the terminal char command = pcSerial.getc(); pcSerial.printf("%c\r\n", command); //loops back to COM port