Brendan Kelly
/
mDot_helloworld_bk_sleep
An attempt to sleep an mDot
Fork of mDot_helloworld_bk by
main.cpp
- Committer:
- mfiore
- Date:
- 2015-06-10
- Revision:
- 0:fdc94d24e54a
- Child:
- 1:34c1fcb8ea5a
File content as of revision 0:fdc94d24e54a:
/************************************* * This simple example program blinks * LED1 and prints a message out the * USB debug port. ************************************/ #include "mbed.h" DigitalOut led(LED1); Ticker tick; // callback function to change LED state void blink() { led = !led; } int main() { // configure the Ticker to blink the LED on 500ms interval tick.attach(&blink, 0.5); // print the message on 2s interval while (true) { printf("Hello world!\r\n"); wait(2); } }