LED

Dependencies:   mbed

Fork of BERTL14_BLINK by Wolfgang Raimann

Revision:
0:0c7182a944d4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed May 07 09:56:05 2014 +0000
@@ -0,0 +1,50 @@
+/***********************************
+name:   BERTL14_BLINK
+author: Wolfgang Raimann
+email:  rai@bulme.at
+description:
+    Die LEDs D10-D13 blinken der Reihe nach auf, danach wird noch die RGB angesteuert
+***********************************/
+
+#include "mbed.h"
+
+DigitalOut Dio10(LED1);
+DigitalOut Dio11(LED2);
+DigitalOut Dio12(LED3);
+DigitalOut Dio13(LED4);
+DigitalOut RGB_G(p26);
+DigitalOut RGB_B(p25);
+DigitalOut RGB_R(p14);
+
+int main() {
+    while(1) {
+        Dio10 = 1;
+        Dio11 = Dio12 = Dio13 = 0;
+        RGB_R = RGB_G = RGB_B = 1;
+        wait(0.2);
+        Dio11 = 1;
+        Dio10 = Dio12 = Dio13 = 0;
+        RGB_R = RGB_G = RGB_B = 1;
+        wait(0.2);
+        Dio12 = 1;
+        Dio10 = Dio11 = Dio13 = 0;
+        RGB_R = RGB_G = RGB_B = 1;
+        wait(0.2);
+        Dio13 = 1;
+        Dio10 = Dio11 = Dio12 = 0;
+        RGB_R = RGB_G = RGB_B = 1;
+        wait(0.2);
+        RGB_R = 0;
+        Dio10 = Dio11 = Dio12 = Dio13 = 0;
+        RGB_G = RGB_B = 1;
+        wait(1);
+        RGB_G = 0;
+        Dio10 = Dio11 = Dio12 = Dio13 = 0;
+        RGB_R = RGB_B = 1;
+        wait(1);
+        RGB_B = 0;
+        Dio10 = Dio11 = Dio12 = Dio13 = 0;
+        RGB_R = RGB_G = 1;
+        wait(1);
+    }
+}