Ömer Sakar
/
mbed-os-example-blinky6
Okz
main.cpp@0:f9e6c5692d8b, 2016-09-27 (annotated)
- Committer:
- ofosakar
- Date:
- Tue Sep 27 10:53:59 2016 +0000
- Revision:
- 0:f9e6c5692d8b
Publish;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ofosakar | 0:f9e6c5692d8b | 1 | #include "mbed.h" |
ofosakar | 0:f9e6c5692d8b | 2 | |
ofosakar | 0:f9e6c5692d8b | 3 | DigitalOut led1(LED1); |
ofosakar | 0:f9e6c5692d8b | 4 | |
ofosakar | 0:f9e6c5692d8b | 5 | // main() runs in its own thread in the OS |
ofosakar | 0:f9e6c5692d8b | 6 | // (note the calls to Thread::wait below for delays) |
ofosakar | 0:f9e6c5692d8b | 7 | int main() { |
ofosakar | 0:f9e6c5692d8b | 8 | while (true) { |
ofosakar | 0:f9e6c5692d8b | 9 | led1 = !led1; |
ofosakar | 0:f9e6c5692d8b | 10 | Thread::wait(500); |
ofosakar | 0:f9e6c5692d8b | 11 | } |
ofosakar | 0:f9e6c5692d8b | 12 | } |
ofosakar | 0:f9e6c5692d8b | 13 |