blinks RGB LED

Dependencies:   mbed

Fork of mbed_blinky by Mbed

Files at this revision

API Documentation at this revision

Comitter:
musashiaharon
Date:
Tue Nov 04 08:28:31 2014 +0000
Parent:
6:e8cd76f38fa9
Commit message:
forked with more info about RGB LED

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri May 09 19:58:03 2014 +0300
+++ b/main.cpp	Tue Nov 04 08:28:31 2014 +0000
@@ -1,12 +1,16 @@
 #include "mbed.h"
 
-DigitalOut myled(LED1);
+DigitalOut rled(LED1);
+DigitalOut gled(LED2);
+DigitalOut bled(LED3);
 
 int main() {
+    rled = 1; // turn off the red LED
+    gled = 1; // green off
     while(1) {
-        myled = 1;
+        bled = 1; // blue off
         wait(0.2);
-        myled = 0;
+        bled = 0; // blue on
         wait(0.2);
     }
 }
--- a/mbed.bld	Fri May 09 19:58:03 2014 +0300
+++ b/mbed.bld	Tue Nov 04 08:28:31 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89
\ No newline at end of file