ELISON CORAGEM
/
etepam_esc23
led blink
main.cpp@0:4371d5c6c2df, 2019-05-23 (annotated)
- Committer:
- ELISONSC
- Date:
- Thu May 23 23:32:56 2019 +0000
- Revision:
- 0:4371d5c6c2df
esc23
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ELISONSC | 0:4371d5c6c2df | 1 | #include "mbed.h" |
ELISONSC | 0:4371d5c6c2df | 2 | |
ELISONSC | 0:4371d5c6c2df | 3 | DigitalOut led1(LED1); |
ELISONSC | 0:4371d5c6c2df | 4 | |
ELISONSC | 0:4371d5c6c2df | 5 | // main() runs in its own thread in the OS |
ELISONSC | 0:4371d5c6c2df | 6 | int main() { |
ELISONSC | 0:4371d5c6c2df | 7 | while (true) { |
ELISONSC | 0:4371d5c6c2df | 8 | led1 = !led1; |
ELISONSC | 0:4371d5c6c2df | 9 | wait(0.5); |
ELISONSC | 0:4371d5c6c2df | 10 | } |
ELISONSC | 0:4371d5c6c2df | 11 | } |
ELISONSC | 0:4371d5c6c2df | 12 |