Button Press on Vibro Model

Dependencies:   mbed

Revision:
0:7b26ada49c8f
diff -r 000000000000 -r 7b26ada49c8f main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Nov 05 00:44:17 2014 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+
+DigitalOut ledB(LED1);
+InterruptIn button1(p15);
+
+void lighton()
+{
+    ledB = 0;
+}
+void lightoff()
+{
+    ledB = 1;
+}
+
+int main()
+{
+    ledB = 1;
+    button1.mode(PullUp);
+    button1.fall(&lighton);
+    button1.rise(&lightoff);
+    while(1)
+    {
+        
+    }
+}