Stefan Seebacher
/
M0_Uebung_3a
M0_Übung_3a
Fork of M0_Lektion03a by
main.cpp@1:3b1fba91ec7a, 2016-04-21 (annotated)
- Committer:
- StefanSeebacher
- Date:
- Thu Apr 21 07:53:58 2016 +0000
- Revision:
- 1:3b1fba91ec7a
- Parent:
- 0:bc474a985a81
M0_?bung_3a;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Enenkel | 0:bc474a985a81 | 1 | #include "mbed.h" |
StefanSeebacher | 1:3b1fba91ec7a | 2 | |
StefanSeebacher | 1:3b1fba91ec7a | 3 | // **** DEFINITIONEN **** |
StefanSeebacher | 1:3b1fba91ec7a | 4 | |
StefanSeebacher | 1:3b1fba91ec7a | 5 | DigitalOut ledGR(p5); |
StefanSeebacher | 1:3b1fba91ec7a | 6 | DigitalOut ledBL(p34); |
StefanSeebacher | 1:3b1fba91ec7a | 7 | DigitalOut ledRT(p36); |
StefanSeebacher | 1:3b1fba91ec7a | 8 | |
StefanSeebacher | 1:3b1fba91ec7a | 9 | // **** HAUPTPROGRAMM **** |
Enenkel | 0:bc474a985a81 | 10 | |
Enenkel | 0:bc474a985a81 | 11 | int main() |
Enenkel | 0:bc474a985a81 | 12 | { |
Enenkel | 0:bc474a985a81 | 13 | while(1) { |
StefanSeebacher | 1:3b1fba91ec7a | 14 | ledGR = 0; |
StefanSeebacher | 1:3b1fba91ec7a | 15 | ledBL = 0; |
StefanSeebacher | 1:3b1fba91ec7a | 16 | ledRT = 0; |
StefanSeebacher | 1:3b1fba91ec7a | 17 | wait(2); |
StefanSeebacher | 1:3b1fba91ec7a | 18 | |
StefanSeebacher | 1:3b1fba91ec7a | 19 | ledGR = 1; |
Enenkel | 0:bc474a985a81 | 20 | ledBL = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 21 | ledRT = 0; |
StefanSeebacher | 1:3b1fba91ec7a | 22 | wait(0.5); |
Enenkel | 0:bc474a985a81 | 23 | |
StefanSeebacher | 1:3b1fba91ec7a | 24 | ledRT = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 25 | ledGR = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 26 | ledBL = 0; |
StefanSeebacher | 1:3b1fba91ec7a | 27 | wait(1); |
StefanSeebacher | 1:3b1fba91ec7a | 28 | |
StefanSeebacher | 1:3b1fba91ec7a | 29 | ledRT = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 30 | ledGR = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 31 | ledBL = 1; |
Enenkel | 0:bc474a985a81 | 32 | wait(1); |
StefanSeebacher | 1:3b1fba91ec7a | 33 | |
StefanSeebacher | 1:3b1fba91ec7a | 34 | ledRT = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 35 | ledGR = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 36 | ledBL = 0; |
StefanSeebacher | 1:3b1fba91ec7a | 37 | wait(1); |
StefanSeebacher | 1:3b1fba91ec7a | 38 | |
StefanSeebacher | 1:3b1fba91ec7a | 39 | ledRT = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 40 | ledGR = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 41 | ledBL = 1; |
Enenkel | 0:bc474a985a81 | 42 | wait(1); |
Enenkel | 0:bc474a985a81 | 43 | |
StefanSeebacher | 1:3b1fba91ec7a | 44 | ledRT = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 45 | ledGR = 0; |
StefanSeebacher | 1:3b1fba91ec7a | 46 | ledBL = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 47 | wait(1); |
StefanSeebacher | 1:3b1fba91ec7a | 48 | |
StefanSeebacher | 1:3b1fba91ec7a | 49 | ledRT = 1; |
Enenkel | 0:bc474a985a81 | 50 | ledGR = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 51 | ledBL = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 52 | wait(1); |
StefanSeebacher | 1:3b1fba91ec7a | 53 | |
StefanSeebacher | 1:3b1fba91ec7a | 54 | ledRT = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 55 | ledGR = 0; |
StefanSeebacher | 1:3b1fba91ec7a | 56 | ledBL = 1; |
Enenkel | 0:bc474a985a81 | 57 | wait(1); |
Enenkel | 0:bc474a985a81 | 58 | |
StefanSeebacher | 1:3b1fba91ec7a | 59 | ledRT = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 60 | ledGR = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 61 | ledBL = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 62 | wait(1); |
StefanSeebacher | 1:3b1fba91ec7a | 63 | |
StefanSeebacher | 1:3b1fba91ec7a | 64 | ledRT = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 65 | ledGR = 0; |
Enenkel | 0:bc474a985a81 | 66 | ledBL = 1; |
Enenkel | 0:bc474a985a81 | 67 | wait(1); |
StefanSeebacher | 1:3b1fba91ec7a | 68 | |
StefanSeebacher | 1:3b1fba91ec7a | 69 | ledRT = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 70 | ledGR = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 71 | ledBL = 1; |
StefanSeebacher | 1:3b1fba91ec7a | 72 | wait(1); |
StefanSeebacher | 1:3b1fba91ec7a | 73 | |
StefanSeebacher | 1:3b1fba91ec7a | 74 | wait(3); |
Enenkel | 0:bc474a985a81 | 75 | } |
Enenkel | 0:bc474a985a81 | 76 | } |
StefanSeebacher | 1:3b1fba91ec7a | 77 | // **** ENDE **** |