Javier Sanchez Peña / Mbed 2 deprecated Prueva_microswitch_pullup

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
javierjsp
Date:
Sun May 14 19:19:34 2017 +0000
Commit message:
v1

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 May 14 19:19:34 2017 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+DigitalIn micro(D0, PullUp);
+DigitalOut myled(LED1);
+
+int main() {
+    while(1) 
+    {
+        if (micro)
+        {
+            myled = 0; // LED is ON
+        }
+        else
+        {
+            myled = 1; // LED is OFF
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun May 14 19:19:34 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/4eea097334d6
\ No newline at end of file