Junichi Katsu
/
Sw
スイッチ入力ベースプログラム
Revision 0:342257f5557d, committed 2013-08-11
- 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