Riad_ Bajraktarevic
/
Joystick_Led
Aufgabe 1. BusOut Programm
main.cpp@1:15d8fa68d1ab, 2020-01-12 (annotated)
- Committer:
- riad
- Date:
- Sun Jan 12 12:29:32 2020 +0000
- Revision:
- 1:15d8fa68d1ab
- Parent:
- 0:c8ca3cbede43
- Child:
- 2:ae17974ea4a6
funktion;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
riad | 0:c8ca3cbede43 | 1 | #include "mbed.h" |
riad | 0:c8ca3cbede43 | 2 | |
riad | 0:c8ca3cbede43 | 3 | BusOut lb(LED1,LED2,LED3,LED4); |
riad | 0:c8ca3cbede43 | 4 | DigitalIn joy(BUTTON1); |
riad | 1:15d8fa68d1ab | 5 | |
riad | 1:15d8fa68d1ab | 6 | |
riad | 1:15d8fa68d1ab | 7 | void lb1 () |
riad | 1:15d8fa68d1ab | 8 | { |
riad | 1:15d8fa68d1ab | 9 | lb = 1; |
riad | 1:15d8fa68d1ab | 10 | wait_ms(100); |
riad | 1:15d8fa68d1ab | 11 | |
riad | 1:15d8fa68d1ab | 12 | for(int i = 0; i<=7; i++) |
riad | 1:15d8fa68d1ab | 13 | { |
riad | 1:15d8fa68d1ab | 14 | lb = lb << 1; |
riad | 1:15d8fa68d1ab | 15 | lb = lb | 1; |
riad | 1:15d8fa68d1ab | 16 | wait_ms(100); |
riad | 1:15d8fa68d1ab | 17 | } |
riad | 1:15d8fa68d1ab | 18 | } |