Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Serial_ex_2 by
Diff: main.cpp
- Revision:
- 3:cbacf69dbed5
- Parent:
- 2:f91fc3b8d8f7
--- a/main.cpp Wed Mar 15 02:24:10 2017 +0000
+++ b/main.cpp Sat Mar 18 10:02:26 2017 +0000
@@ -1,8 +1,8 @@
#include "mbed.h"
/*
- Serial2RGB main by C. S. Tritt, Last revised 3/14/17 (v. 1.0)
+ Serial2RGB main by C. S. Tritt, Last revised 3/18/17 (v. 1.1)
- Toggles RGB LED junctions in response to serial input.
+ Toggles RGB LED junctions in response to serial input. Echos input.
Suggested wiring...
@@ -19,7 +19,7 @@
\-- 680 Ω -- D11 (blue)
*/
-DigitalOut RedLED(D9); // Physically same as Arduino Digital pin 9.
+DigitalOut RedLED(D9); // Physically same as Arduino Digital pin 9 on Nucleos.
DigitalOut GrnLED(D10); // Physically same as Arduino Digital pin 10.
DigitalOut BluLED(D11); // Physically same as Arduino Digital pin 11.
@@ -32,7 +32,7 @@
BluLED = 0;
char letter;
- while(1) {
+ while(true) {
if (pc.readable()) {
letter = pc.getc();
pc.putc(letter);
@@ -47,4 +47,4 @@
}
}
}
-}
+}
\ No newline at end of file
