Alle LED's leuchten bei verschiedenen Lichtstärkern SW1 Sw2 Sw3 Sw4 Taster test

Dependencies:   mbed

Revision:
0:30bb00ce736e
Child:
1:f619bd48aa06
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 30 10:50:10 2015 +0000
@@ -0,0 +1,39 @@
+/*  M0-BOARD LPC11U24 VERSION 1.0
+    BULME Graz | Elektronik FSST
+    Thomas Hauser | 3 AHELI
+    KITTV3  */
+
+#include "mbed.h"
+
+BusOut myled(P1_13,P1_12,P1_7,P1_6,P1_4,P1_3,P1_1,P1_0,LED4,LED3,LED2,LED1);
+int i;
+float t = 0.02;
+
+int main() {
+    while(1) {       
+        myled = 0x001; 
+        wait(t);
+        myled = 0x003;
+        wait(t);
+        myled = 0x007;
+        wait(t);
+        myled = 0x00F;
+        wait(t);
+        for (i = 1; i < 12; i++)
+        {
+            myled = myled << 1;
+            wait(t);             
+        }
+        myled = 0xC00;
+        wait(t);
+        myled = 0xE00;
+        wait(t);
+        myled = 0xF00;
+        wait(t);
+        for (i = 1; i < 11; i++)
+        {
+            myled = myled >> 1;
+            wait(t);
+        }
+    }
+}
\ No newline at end of file