k

Dependencies:   mbed

Revision:
0:3fb63a3c606b
diff -r 000000000000 -r 3fb63a3c606b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 07 15:46:30 2014 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+DigitalIn boton(D2);
+
+int main() {
+    boton.mode(PullUp);
+    while(1) {
+        if (boton == 1){
+            myled = 1;
+        } else {
+            myled = 0;
+        }
+    }
+}