Charles Tritt / Mbed OS Serial2RGB_21_v5
Revision:
3:cbacf69dbed5
Parent:
2:f91fc3b8d8f7
Child:
4:43ce9b92ae68
diff -r f91fc3b8d8f7 -r cbacf69dbed5 main.cpp
--- 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