Gerardo Carmona
/
MSE_resistencia_pulldown
PullDown example
Revision 0:9434991dadf5, committed 2014-11-20
- Comitter:
- gcarmonar
- Date:
- Thu Nov 20 20:44:17 2014 +0000
- Commit message:
- PullDown example
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 9434991dadf5 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 20 20:44:17 2014 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" + +DigitalOut led(LED_BLUE); +DigitalIn boton(D2); + +int main() +{ + boton.mode(PullDown); + while (true) { + if (boton){ + led = !led; + wait(1); + } + } +} \ No newline at end of file
diff -r 000000000000 -r 9434991dadf5 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 20 20:44:17 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89 \ No newline at end of file