mbed_example
/
Wait_HelloWorld
How to use wait
Diff: main.cpp
- Revision:
- 0:7780c906c1c7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jan 19 11:34:26 2017 -0600 @@ -0,0 +1,12 @@ +#include "mbed.h" + +DigitalOut heartbeat(LED1); + +int main() { + while (1) { + heartbeat = 1; + wait(0.5); + heartbeat = 0; + wait(0.5); + } +}