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 aReadConditional by
Revision 6:48052cf53bf2, committed 2017-10-08
- 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
    