Dr. Pucher
/
mbed_blinky_5ABELI
My first Blinky-Program
5ABELI Testprogramm
Weiter gehts!
main.cpp@0:5629bcae0c89, 2017-12-04 (annotated)
- Committer:
- bulmecisco
- Date:
- Mon Dec 04 18:24:50 2017 +0000
- Revision:
- 0:5629bcae0c89
First try
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bulmecisco | 0:5629bcae0c89 | 1 | #include "mbed.h" |
bulmecisco | 0:5629bcae0c89 | 2 | |
bulmecisco | 0:5629bcae0c89 | 3 | DigitalOut myled(LED1); |
bulmecisco | 0:5629bcae0c89 | 4 | DigitalOut myled2(LED2, 1); |
bulmecisco | 0:5629bcae0c89 | 5 | |
bulmecisco | 0:5629bcae0c89 | 6 | int main() { |
bulmecisco | 0:5629bcae0c89 | 7 | while(1) { |
bulmecisco | 0:5629bcae0c89 | 8 | myled.write(1); |
bulmecisco | 0:5629bcae0c89 | 9 | myled2 = !myled2; |
bulmecisco | 0:5629bcae0c89 | 10 | wait(0.5); |
bulmecisco | 0:5629bcae0c89 | 11 | myled = 0; |
bulmecisco | 0:5629bcae0c89 | 12 | wait(0.5); |
bulmecisco | 0:5629bcae0c89 | 13 | } |
bulmecisco | 0:5629bcae0c89 | 14 | } |