blink D3 LED on UDK2 board
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:6c83a2dfae11
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Sep 25 15:47:01 2015 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" + +DigitalOut led(LED1); +Ticker tick; + +void tock() { + led = !led; +} + +int main() { + // call the tock() function every 0.5 seconds + tick.attach(&tock, 0.5); + + while (true); +} \ No newline at end of file