Eduvance vanmat
/
04Push_Button_LED
Push Buttons to control 4 LED
main.cpp@0:9ea5fee5968c, 2014-05-17 (annotated)
- Committer:
- Eduvance
- Date:
- Sat May 17 16:28:50 2014 +0000
- Revision:
- 0:9ea5fee5968c
InitialRawCommit;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Eduvance | 0:9ea5fee5968c | 1 | #include "mbed.h" |
Eduvance | 0:9ea5fee5968c | 2 | |
Eduvance | 0:9ea5fee5968c | 3 | DigitalOut myled(LED1); |
Eduvance | 0:9ea5fee5968c | 4 | |
Eduvance | 0:9ea5fee5968c | 5 | int main() { |
Eduvance | 0:9ea5fee5968c | 6 | while(1) { |
Eduvance | 0:9ea5fee5968c | 7 | myled = 1; |
Eduvance | 0:9ea5fee5968c | 8 | wait(0.2); |
Eduvance | 0:9ea5fee5968c | 9 | myled = 0; |
Eduvance | 0:9ea5fee5968c | 10 | wait(0.2); |
Eduvance | 0:9ea5fee5968c | 11 | } |
Eduvance | 0:9ea5fee5968c | 12 | } |