alle Leds laufen durch und blinken anschließend gemeinsam

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
georgjonak
Date:
Mon Jun 20 06:45:03 2016 +0000
Commit message:
B16 Lauflicht

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jun 20 06:45:03 2016 +0000
@@ -0,0 +1,164 @@
+#include "mbed.h"
+
+
+
+    DigitalOut LedD1 (P1_10);      
+    DigitalOut LedD2 (P1_11);
+    DigitalOut LedD4 (P1_12);
+    DigitalOut LedD5 (P1_13);
+    DigitalOut LedD6 (P1_14);      
+    DigitalOut LedD7 (P1_15);
+    DigitalOut LedD8 (P1_16);
+    DigitalOut LedD9 (P1_17);
+    DigitalOut LedD10 (P1_18);     
+    DigitalOut LedD11 (P2_16);
+    DigitalOut LedD12 (P1_20);
+    DigitalOut LedD13 (P1_21);
+    
+  int main() {
+    while(1) {  
+    //_____________________________________Leds aus__________________________________
+    LedD1 = 1;
+    LedD2 = 1;
+    LedD4 = 1;
+    LedD5 = 1;
+    LedD6 = 1;
+    LedD7 = 1;
+    LedD8 = 1;
+    LedD9 = 1;
+    LedD10 = 1;
+    LedD11 = 1;
+    LedD12 = 1;
+    LedD13 = 1;
+    //_________________________________starte Blinkvorgang jeder Led____________________
+     LedD1 = 0;
+    wait (0.5);
+    LedD1 = 1;
+    LedD2 = 0;
+    wait(0.5);
+    LedD2 = 1;
+    LedD4 = 0;
+    wait (0.5);
+    LedD4 = 1;
+    LedD5 = 0;
+    wait(0.5);
+    LedD5 = 1;
+    LedD6 = 0;
+    wait(0.5);
+    LedD6 = 1;
+    LedD7 = 0;
+    wait(0.5);
+    LedD7 = 1;
+    LedD8 = 0;
+    wait(0.5);
+    LedD8 = 1;
+    LedD9 = 0;
+    wait(0.5);
+    LedD9 = 1;
+    LedD10 = 0;
+    wait(0.5);
+    LedD10 = 1;
+    LedD11 = 0;
+    wait(0.5);
+    LedD11 = 1;
+    LedD13 = 0;
+    wait(0.5);
+    LedD13 = 1;
+    LedD12 = 0;
+    wait(0.5);
+    LedD12 = 1;
+    wait (0.5);
+    //________________________________________Blinken aller Leds__________________________________
+    
+    LedD1 = 0;
+    LedD2 = 0;
+    LedD4 = 0;
+    LedD5 = 0;
+    LedD6 = 0;
+    LedD7 = 0;
+    LedD8 = 0;
+    LedD9 = 0;
+    LedD10 = 0;
+    LedD11 = 0;
+    LedD12 = 0;
+    LedD13 = 0;
+    
+    wait(0.5);
+    
+    LedD1 = 1;
+    LedD2 = 1;
+    LedD4 = 1;
+    LedD5 = 1;
+    LedD6 = 1;
+    LedD7 = 1;
+    LedD8 = 1;
+    LedD9 = 1;
+    LedD10 = 1;
+    LedD11 = 1;
+    LedD12 = 1;
+    LedD13 = 1;    
+    
+    wait(0.5);
+    
+    LedD1 = 0;
+    LedD2 = 0;
+    LedD4 = 0;
+    LedD5 = 0;
+    LedD6 = 0;
+    LedD7 = 0;
+    LedD8 = 0;
+    LedD9 = 0;
+    LedD10 = 0;
+    LedD11 = 0;
+    LedD12 = 0;
+    LedD13 = 0;
+    
+    wait(0.5);
+    
+    LedD1 = 1;
+    LedD2 = 1;
+    LedD4 = 1;
+    LedD5 = 1;
+    LedD6 = 1;
+    LedD7 = 1;
+    LedD8 = 1;
+    LedD9 = 1;
+    LedD10 = 1;
+    LedD11 = 1;
+    LedD12 = 1;
+    LedD13 = 1;    
+    
+    wait(0.5);
+    
+    LedD1 = 0;
+    LedD2 = 0;
+    LedD4 = 0;
+    LedD5 = 0;
+    LedD6 = 0;
+    LedD7 = 0;
+    LedD8 = 0;
+    LedD9 = 0;
+    LedD10 = 0;
+    LedD11 = 0;
+    LedD12 = 0;
+    LedD13 = 0;
+    
+    wait(0.5);
+    
+    LedD1 = 1;
+    LedD2 = 1;
+    LedD4 = 1;
+    LedD5 = 1;
+    LedD6 = 1;
+    LedD7 = 1;
+    LedD8 = 1;
+    LedD9 = 1;
+    LedD10 = 1;
+    LedD11 = 1;
+    LedD12 = 1;
+    LedD13 = 1;    
+    
+    wait(0.5);
+    
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jun 20 06:45:03 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file