M0_Übung_2b

Dependencies:   mbed

Fork of M0_Lektion02b by Gottfried Enenkel

Committer:
StefanSeebacher
Date:
Thu Apr 21 07:47:32 2016 +0000
Revision:
3:51957e6c8ab4
Parent:
2:46da9f6bc48c
M0_?bung_2b

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Enenkel 0:fe5e1c689c26 1 #include "mbed.h"
StefanSeebacher 3:51957e6c8ab4 2
StefanSeebacher 3:51957e6c8ab4 3 // **** DEFINITIONEN ****
StefanSeebacher 3:51957e6c8ab4 4
Enenkel 0:fe5e1c689c26 5 DigitalOut LedD1 (P1_8);
Enenkel 0:fe5e1c689c26 6 DigitalOut LedD2 (P1_9);
StefanSeebacher 3:51957e6c8ab4 7 DigitalOut LedD3 (P1_10);
StefanSeebacher 3:51957e6c8ab4 8 DigitalOut LedD4 (P1_11);
StefanSeebacher 3:51957e6c8ab4 9 DigitalOut LedD13 (P1_0);
Enenkel 0:fe5e1c689c26 10 DigitalOut LedD14 (P1_1);
StefanSeebacher 3:51957e6c8ab4 11 DigitalOut LedD15 (P1_3);
StefanSeebacher 3:51957e6c8ab4 12 DigitalOut LedD16 (P1_4);
StefanSeebacher 3:51957e6c8ab4 13 DigitalOut LedD17 (P1_6);
StefanSeebacher 3:51957e6c8ab4 14 DigitalOut LedD18 (P1_7);
StefanSeebacher 3:51957e6c8ab4 15 DigitalOut LedD19 (P1_12);
StefanSeebacher 3:51957e6c8ab4 16 DigitalOut LedD20 (P1_13);
Enenkel 0:fe5e1c689c26 17
StefanSeebacher 3:51957e6c8ab4 18 // **** HAUPTPROGRAMM ****
StefanSeebacher 3:51957e6c8ab4 19
Enenkel 2:46da9f6bc48c 20 int main()
Enenkel 2:46da9f6bc48c 21 {
StefanSeebacher 3:51957e6c8ab4 22 while(1)
Enenkel 0:fe5e1c689c26 23 {
StefanSeebacher 3:51957e6c8ab4 24 LedD1=1;
StefanSeebacher 3:51957e6c8ab4 25 wait(0.4);
StefanSeebacher 3:51957e6c8ab4 26 LedD2=1;
StefanSeebacher 3:51957e6c8ab4 27 wait (0.4);
Enenkel 0:fe5e1c689c26 28 LedD1=0;
StefanSeebacher 3:51957e6c8ab4 29 LedD3=1;
Enenkel 0:fe5e1c689c26 30 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 31 LedD2=0;
StefanSeebacher 3:51957e6c8ab4 32 LedD4=1;
StefanSeebacher 3:51957e6c8ab4 33 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 34 LedD3=0;
Enenkel 0:fe5e1c689c26 35 LedD13=1;
Enenkel 0:fe5e1c689c26 36 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 37 LedD4=0;
Enenkel 0:fe5e1c689c26 38 LedD14=1;
Enenkel 0:fe5e1c689c26 39 wait (0.4);
Enenkel 0:fe5e1c689c26 40 LedD13=0;
StefanSeebacher 3:51957e6c8ab4 41 LedD15=1;
Enenkel 0:fe5e1c689c26 42 wait (0.4);
Enenkel 0:fe5e1c689c26 43 LedD14=0;
StefanSeebacher 3:51957e6c8ab4 44 LedD16=1;
StefanSeebacher 3:51957e6c8ab4 45 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 46 LedD15=0;
StefanSeebacher 3:51957e6c8ab4 47 LedD17=1;
StefanSeebacher 3:51957e6c8ab4 48 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 49 LedD16=0;
StefanSeebacher 3:51957e6c8ab4 50 LedD18=1;
StefanSeebacher 3:51957e6c8ab4 51 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 52 LedD17=0;
StefanSeebacher 3:51957e6c8ab4 53 LedD19=1;
StefanSeebacher 3:51957e6c8ab4 54 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 55 LedD18=0;
StefanSeebacher 3:51957e6c8ab4 56 LedD20=1;
StefanSeebacher 3:51957e6c8ab4 57 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 58 LedD19=0;
StefanSeebacher 3:51957e6c8ab4 59 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 60 LedD20=0;
StefanSeebacher 3:51957e6c8ab4 61 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 62
StefanSeebacher 3:51957e6c8ab4 63 //Zurück
Enenkel 0:fe5e1c689c26 64
StefanSeebacher 3:51957e6c8ab4 65 LedD20=1;
Enenkel 0:fe5e1c689c26 66 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 67 LedD19=1;
StefanSeebacher 3:51957e6c8ab4 68 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 69 LedD20=0;
StefanSeebacher 3:51957e6c8ab4 70 LedD18=1;
StefanSeebacher 3:51957e6c8ab4 71 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 72 LedD19=0;
StefanSeebacher 3:51957e6c8ab4 73 LedD17=1;
StefanSeebacher 3:51957e6c8ab4 74 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 75 LedD18=0;
StefanSeebacher 3:51957e6c8ab4 76 LedD16=1;
StefanSeebacher 3:51957e6c8ab4 77 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 78 LedD17=0;
StefanSeebacher 3:51957e6c8ab4 79 LedD15=1;
StefanSeebacher 3:51957e6c8ab4 80 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 81 LedD16=0;
StefanSeebacher 3:51957e6c8ab4 82 LedD14=1;
StefanSeebacher 3:51957e6c8ab4 83 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 84 LedD15=0;
StefanSeebacher 3:51957e6c8ab4 85 LedD13=1;
StefanSeebacher 3:51957e6c8ab4 86 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 87 LedD14=0;
StefanSeebacher 3:51957e6c8ab4 88 LedD4=1;
StefanSeebacher 3:51957e6c8ab4 89 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 90 LedD13=0;
StefanSeebacher 3:51957e6c8ab4 91 LedD3=1;
StefanSeebacher 3:51957e6c8ab4 92 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 93 LedD4=0;
StefanSeebacher 3:51957e6c8ab4 94 LedD2=1;
StefanSeebacher 3:51957e6c8ab4 95 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 96 LedD3=0;
StefanSeebacher 3:51957e6c8ab4 97 LedD1=1;
StefanSeebacher 3:51957e6c8ab4 98 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 99 LedD2=0;
StefanSeebacher 3:51957e6c8ab4 100 wait (0.4);
StefanSeebacher 3:51957e6c8ab4 101 LedD1=0;
StefanSeebacher 3:51957e6c8ab4 102 wait (0.4);
Enenkel 0:fe5e1c689c26 103
Enenkel 0:fe5e1c689c26 104 }
Enenkel 0:fe5e1c689c26 105 }
StefanSeebacher 3:51957e6c8ab4 106 // **** ENDE ****