Charles Tritt / Mbed 2 deprecated mySmrtNL_2

Dependencies:   mbed

Fork of aReadConditional by Charles Tritt

Files at this revision

API Documentation at this revision

Comitter:
CSTritt
Date:
Sun Oct 08 03:39:44 2017 +0000
Parent:
5:a08ed9b4c671
Commit message:
Reading of DigitalOut states made explicit. Comments cleaned up.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Oct 08 02:44:47 2017 +0000
+++ b/main.cpp	Sun Oct 08 03:39:44 2017 +0000
@@ -57,8 +57,8 @@
             grn.write(LOW);
             blu.write(LOW);
         }
-        // Retreive and send LED state via serial.
-        printf("RGB State: %d %d %d\n", (int) red, (int) grn, (int) blu);
+        // Read and send LED state via serial.
+        printf("RGB State: %d %d %d\n", red.read(), grn.read(), blu.read());
         wait(0.5); // Half a second (500 mS).
     }
 }
\ No newline at end of file