3_GPIO_Switch

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
HarishMekali
Date:
Fri Oct 04 18:28:06 2013 +0000
Commit message:
3 GPIO Switch

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 03ea3964e4a7 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 04 18:28:06 2013 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+DigitalIn enable(p18);
+
+int main() 
+{
+    while(1) 
+    {
+    if(enable)
+        {
+            myled = !myled;
+            wait(0.25);
+        }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 03ea3964e4a7 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Oct 04 18:28:06 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file