Jan Jongboom
/
mbed-edge-tutorial-firmware
This is the firmware for the 'Connecting devices to Pelion Device Management using Mbed Edge' tutorial
Diff: source/main.cpp
- Revision:
- 2:f76a61a91e47
- Parent:
- 0:2f1d715b6434
--- a/source/main.cpp Tue Aug 14 12:18:50 2018 +0200 +++ b/source/main.cpp Tue Aug 14 12:27:31 2018 +0200 @@ -39,7 +39,7 @@ int main() { pc.baud(115200); - pc.printf("Hello from proprietary serial device #1\r\n"); + pc.printf("!Hello from proprietary serial device #1\r\n"); pc.attach(callback(&rx_irq)); btn.fall(callback(&btn_irq)); @@ -48,12 +48,14 @@ if (serial_line_ready) { if (strcmp(serial_buffer, "+LED1") == 0) { led = 1; + printf(">%s\r\n!LED1 is now on\r\n", serial_buffer); } else if (strcmp(serial_buffer, "-LED1") == 0) { led = 0; + printf(">%s\r\n!LED1 is now off\r\n", serial_buffer); } else { - printf("Unknown command '%s'\r\n", serial_buffer); + printf(">%s\r\n!Unknown command\r\n", serial_buffer); } serial_line_ready = false;