Luca Mottola / Mbed 2 deprecated AthensFall19-DISCO-ButtonBusy

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lmottola
Date:
Thu Nov 08 16:59:47 2018 +0000
Commit message:
Initial commit

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	Thu Nov 08 16:59:47 2018 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+
+DigitalIn button(USER_BUTTON); // Change to match your board
+DigitalOut led(LED1);
+
+#define BUTTON_PRESS 0
+
+int main() {
+    while(1) {
+        if(BUTTON_PRESS == button){
+           led = !led;
+           wait(1);
+       }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 08 16:59:47 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187
\ No newline at end of file