Nickolay Ihalainen / Mbed 2 deprecated Nucleo_blink_led

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ihanick
Date:
Sun Apr 02 18:35:47 2017 +0000
Commit message:
another blink

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Apr 02 18:35:47 2017 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+
+template <int off_ms=999, int on_ms=1>
+void blink(DigitalOut& pin) {
+    pin = 1;
+    wait_ms(on_ms);
+    pin = 0;
+    wait_ms(off_ms);
+}
+
+int main() {
+    while(1) {
+        blink(myled);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Apr 02 18:35:47 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/856d2700e60b
\ No newline at end of file