Der Praktikant
/
led_test2
LED test fork
Fork of led_test by
main.cpp@2:e0a2da2e3ce7, 2016-04-08 (annotated)
- Committer:
- Praktikant
- Date:
- Fri Apr 08 13:30:45 2016 +0000
- Revision:
- 2:e0a2da2e3ce7
- Parent:
- 1:1d60dc3c3b08
new binking pattern
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Praktikant | 0:fb66e57f89c4 | 1 | #include "mbed.h" |
Praktikant | 0:fb66e57f89c4 | 2 | |
Praktikant | 0:fb66e57f89c4 | 3 | DigitalOut myled(LED1); |
Praktikant | 0:fb66e57f89c4 | 4 | DigitalOut myled2(LED2); |
Praktikant | 0:fb66e57f89c4 | 5 | |
Praktikant | 0:fb66e57f89c4 | 6 | int main() { |
Praktikant | 2:e0a2da2e3ce7 | 7 | int i = 0; |
Praktikant | 0:fb66e57f89c4 | 8 | while(1) { |
Praktikant | 2:e0a2da2e3ce7 | 9 | myled = i & 1; // LED is ON |
Praktikant | 2:e0a2da2e3ce7 | 10 | myled2 = i & 2; |
Praktikant | 2:e0a2da2e3ce7 | 11 | wait(0.25); |
Praktikant | 2:e0a2da2e3ce7 | 12 | i++; |
Praktikant | 0:fb66e57f89c4 | 13 | } |
Praktikant | 0:fb66e57f89c4 | 14 | } |