![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Meins
Dependencies: mbed
main.cpp@0:1f1f815cafa5, 2015-10-30 (annotated)
- Committer:
- PinguPanda
- Date:
- Fri Oct 30 12:28:03 2015 +0000
- Revision:
- 0:1f1f815cafa5
30.10.2015;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
PinguPanda | 0:1f1f815cafa5 | 1 | #include "mbed.h" |
PinguPanda | 0:1f1f815cafa5 | 2 | |
PinguPanda | 0:1f1f815cafa5 | 3 | DigitalOut myled1(LED1,1); |
PinguPanda | 0:1f1f815cafa5 | 4 | DigitalOut myled2(LED2,1); |
PinguPanda | 0:1f1f815cafa5 | 5 | BusOut bo2Bits(LED3,LED4); |
PinguPanda | 0:1f1f815cafa5 | 6 | int main() { |
PinguPanda | 0:1f1f815cafa5 | 7 | wait(2); |
PinguPanda | 0:1f1f815cafa5 | 8 | int a = 0; |
PinguPanda | 0:1f1f815cafa5 | 9 | while(1) |
PinguPanda | 0:1f1f815cafa5 | 10 | { |
PinguPanda | 0:1f1f815cafa5 | 11 | myled1=1; |
PinguPanda | 0:1f1f815cafa5 | 12 | wait(0.2); |
PinguPanda | 0:1f1f815cafa5 | 13 | myled1=0; |
PinguPanda | 0:1f1f815cafa5 | 14 | if(a++ %4 ==0) |
PinguPanda | 0:1f1f815cafa5 | 15 | myled2=!myled2; |
PinguPanda | 0:1f1f815cafa5 | 16 | wait(0.2); |
PinguPanda | 0:1f1f815cafa5 | 17 | bo2Bits =bo2Bits+1; |
PinguPanda | 0:1f1f815cafa5 | 18 | } |
PinguPanda | 0:1f1f815cafa5 | 19 | |
PinguPanda | 0:1f1f815cafa5 | 20 | } |