This program combines the RGB colors to create 7 diferent combinations

Dependencies:   mbed

Revision:
0:1abdccc5994d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Oct 09 21:06:39 2013 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+
+DigitalOut bled(LED1);
+DigitalOut gled(LED2);
+DigitalOut rled(LED3);
+
+int main() {
+    bled = 1;
+    gled = 1;
+    rled = 1;
+    
+    while(1) {
+        // Azul
+        bled = 0;
+        rled = 1;
+        gled = 1;
+        wait(0.5);
+        // Verde
+        bled = 1;
+        gled = 0;
+        wait(0.5);
+        // Rojo
+        gled = 1;
+        rled = 0;
+        wait(0.5);
+        // Verde + Rojo  = Amarillo
+        gled = 0;
+        wait(0.5);
+        // Verde + Azul = Cyan
+        rled = 1;
+        bled = 0;
+        wait(0.5);
+        // Azul + Rojo = Rosa
+        gled = 1;
+        rled = 0;
+        wait(0.5);
+        // Azul + Rojo + Verde = Blanco
+        gled = 0;
+        wait(0.5);
+        
+    }
+}