Junichi Katsu
/
SwTest
スイッチ入力例 ロボット製作セミナー演習
Revision 0:982ecd0e0217, committed 2013-08-10
- Comitter:
- jksoft
- Date:
- Sat Aug 10 03:06:36 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 982ecd0e0217 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Aug 10 03:06:36 2013 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" + +DigitalIn enable(p29); +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 982ecd0e0217 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Aug 10 03:06:36 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e3affc9e7238 \ No newline at end of file