Modify blinky to program a flashing white light.

Dependencies:   mbed

Fork of mbed_blinky by Mbed

Files at this revision

API Documentation at this revision

Comitter:
Miniboon
Date:
Thu Apr 28 04:10:40 2016 +0000
Parent:
11:4cfe2fa00668
Commit message:
Simple program for programming RGB to be a near white flashing light.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Mar 08 12:40:16 2016 +0000
+++ b/main.cpp	Thu Apr 28 04:10:40 2016 +0000
@@ -1,12 +1,18 @@
 #include "mbed.h"
 
-DigitalOut myled(LED1);
+DigitalOut myled1(LED1);
+DigitalOut myled2(LED2);
+DigitalOut myled3(LED3);
 
 int main() {
     while(1) {
-        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);
+        myled1 = 1;
+        myled2 = 1;
+        myled3 = 1;
+        wait(0.1);
+        myled1 = 0;
+        myled2 = 0;
+        myled3 = 0;
+        wait(0.1);
     }
 }