Button Press on Vibro Model

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mfillinois
Date:
Wed Nov 05 00:44:17 2014 +0000
Commit message:
FirstTry

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
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)
+    {
+        
+    }
+}
diff -r 000000000000 -r 7b26ada49c8f mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Nov 05 00:44:17 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89
\ No newline at end of file