This is just a small program to check what possible led effects could be done - ofcourse the knight rider is the coolest one :)
main.cpp@0:7ac23aec3248, 2010-08-01 (annotated)
- Committer:
- Flanker
- Date:
- Sun Aug 01 19:25:40 2010 +0000
- Revision:
- 0:7ac23aec3248
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Flanker | 0:7ac23aec3248 | 1 | #include "mbed.h" |
Flanker | 0:7ac23aec3248 | 2 | //This is just a small testing program what LED effects can be done (knight rider style :)) |
Flanker | 0:7ac23aec3248 | 3 | |
Flanker | 0:7ac23aec3248 | 4 | DigitalOut myled1(LED1); |
Flanker | 0:7ac23aec3248 | 5 | DigitalOut myled2(LED2); |
Flanker | 0:7ac23aec3248 | 6 | DigitalOut myled3(LED3); |
Flanker | 0:7ac23aec3248 | 7 | DigitalOut myled4(LED4); |
Flanker | 0:7ac23aec3248 | 8 | |
Flanker | 0:7ac23aec3248 | 9 | int main() { |
Flanker | 0:7ac23aec3248 | 10 | while(1) { |
Flanker | 0:7ac23aec3248 | 11 | //This part will turn on the leds |
Flanker | 0:7ac23aec3248 | 12 | myled1 = 1; |
Flanker | 0:7ac23aec3248 | 13 | wait(0.1); |
Flanker | 0:7ac23aec3248 | 14 | myled2 = 1; |
Flanker | 0:7ac23aec3248 | 15 | wait(0.1); |
Flanker | 0:7ac23aec3248 | 16 | myled3 = 1; |
Flanker | 0:7ac23aec3248 | 17 | wait(0.1); |
Flanker | 0:7ac23aec3248 | 18 | myled4 = 1; |
Flanker | 0:7ac23aec3248 | 19 | wait(0.1); |
Flanker | 0:7ac23aec3248 | 20 | //This part will turn off the leds |
Flanker | 0:7ac23aec3248 | 21 | myled1 = 0; |
Flanker | 0:7ac23aec3248 | 22 | wait(0.1); |
Flanker | 0:7ac23aec3248 | 23 | myled2 = 0; |
Flanker | 0:7ac23aec3248 | 24 | wait(0.1); |
Flanker | 0:7ac23aec3248 | 25 | myled3 = 0; |
Flanker | 0:7ac23aec3248 | 26 | wait(0.1); |
Flanker | 0:7ac23aec3248 | 27 | myled4 = 0; |
Flanker | 0:7ac23aec3248 | 28 | wait(0.1); |
Flanker | 0:7ac23aec3248 | 29 | } |
Flanker | 0:7ac23aec3248 | 30 | } |