m0 board Lauflicht

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
PatrickMarterer
Date:
Tue Mar 21 10:17:40 2017 +0000
Commit message:
lauflicht mit Taster

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
diff -r 000000000000 -r 3931d1f0c31b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 21 10:17:40 2017 +0000
@@ -0,0 +1,74 @@
+#include "mbed.h"
+
+
+
+BusOut led(P1_8, P1_9, P1_10, P1_11, P1_0, P1_1, P1_3, P1_4, P1_6, P1_7, P1_12, P1_13);
+BusOut Taster(P0_10, P0_15, P0_23, P1_16);
+DigitalOut SW1(P0_10);
+DigitalOut SW2(P0_15);
+
+int main() 
+{
+    while(1)
+    {
+        if (SW1 == 1)
+        {
+    led = 3;
+    wait(0.2);
+    led = 6;
+    wait(0.2);
+    led =12;
+    wait(0.2);
+    led = 24;
+    wait(0.2);
+    led =48;
+    wait(0.2);
+    led = 96;
+    wait(0.2);
+    led =192;
+    wait(0.2);
+    led = 384;
+    wait(0.2);
+    led =768;
+    wait(0.2);
+    led = 1536;
+    wait(0.2);
+    led = 3072;
+    wait(0.2);
+    led = 2049;
+    wait(0.2);
+    led =0;
+    }
+    else if (SW2 == 1)
+    {
+        
+    
+    led = 0b000000000111;
+    wait(0.2);
+    led = 0b000000001110;
+    wait(0.2);
+    led = 0b000000011100;
+    wait(0.2);
+    led = 0b000000111000;
+    wait(0.2);
+    led = 0b000001110000;
+    wait(0.2);
+    led = 0b000011100000;
+    wait(0.2);
+    led = 0b000111000000;
+    wait(0.2);
+    led = 0b001110000000;
+    wait(0.2);
+    led = 0b011100000000;
+    wait(0.2);
+    led = 0b111000000000;
+    wait(0.2);
+    led = 0b110000000001;
+    wait(0.2);
+    led = 0b000000000000;
+    wait(0.5);
+    }
+    
+    }
+    
+}
diff -r 000000000000 -r 3931d1f0c31b mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 21 10:17:40 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/093f2bd7b9eb
\ No newline at end of file