This is the firmware for the 'Connecting devices to Pelion Device Management using Mbed Edge' tutorial
Revision 2:f76a61a91e47, committed 2018-08-14
- Comitter:
- Jan Jongboom
- Date:
- Tue Aug 14 12:27:31 2018 +0200
- Parent:
- 1:8f3bde1e6384
- Commit message:
- Report stdin status back
Changed in this revision
| source/main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;