スイッチ入力ベースプログラム

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
jksoft
Date:
Sun Aug 11 00:17:31 2013 +0000
Commit message:
Rev1

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 342257f5557d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Aug 11 00:17:31 2013 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+ 
+DigitalIn enable(p5);
+DigitalOut led(LED1);
+ 
+int main() {
+
+    enable.mode(PullUp);
+
+    while(1) {
+        if(enable) {
+            led = !led;
+        }
+        wait(0.25);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 342257f5557d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Aug 11 00:17:31 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e3affc9e7238
\ No newline at end of file