Test

Fork of Nucleo-mbed-os-example-blinky by Helmut Tschemernjak

Files at this revision

API Documentation at this revision

Comitter:
Helmut64
Date:
Wed Aug 17 17:58:13 2016 +0000
Child:
1:860c7462805e
Commit message:
Erste Version ist fertig

Changed in this revision

.gitignore Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.gitignore	Wed Aug 17 17:58:13 2016 +0000
@@ -0,0 +1,4 @@
+.build
+.mbed
+projectfiles
+*.py*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Aug 17 17:58:13 2016 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+
+
+DigitalOut led1(LED1);
+InterruptIn event(USER_BUTTON);
+Ticker ticker;
+
+void
+ButtonPressed(void)
+{
+        led1 = !led1;
+}
+
+void
+AlarmHandler(void)
+{
+            led1 = !led1;
+}
+
+int main()
+{
+    event.rise(&ButtonPressed);
+    ticker.attach(&AlarmHandler, 1.5);
+
+    while (true) {
+        ;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Wed Aug 17 17:58:13 2016 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#0993ae540c5c4b5ce3004bead1aefc0c6d1b3ea0