eLab Team / Mbed 2 deprecated LaLaBox

Dependencies:   mbed CREALIB

Revision:
0:30cb0f6dad87
Child:
1:ab4c9a0a5374
diff -r 000000000000 -r 30cb0f6dad87 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jun 17 10:41:31 2016 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+Ticker toggle_led_ticker;
+
+DigitalOut led1(LED1);
+
+void toggle_led() {
+    led1 = !led1;
+}
+
+int main() {
+    // Init the ticker with the address of the function (toggle_led) to be attached and the interval (100 ms)
+    toggle_led_ticker.attach(&toggle_led, 0.1);
+    while (true) {
+        // Do other things...
+    }
+}
\ No newline at end of file