código solenoide 0 e 1
Dependencies: mbed
Revision 0:ad6713197fd2, committed 2018-05-07
- Comitter:
- eduardogebara
- Date:
- Mon May 07 20:03:47 2018 +0000
- Commit message:
- c?digo solen?ide
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 ad6713197fd2 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon May 07 20:03:47 2018 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" + +DigitalOut outcorr(D13); +bool estado = 0; + +int main(){ + while(1){ + wait(2); + estado =! estado; + if (estado == 1){ + outcorr.write(0); + } + else { + outcorr.write(1); + } + wait(0.2); + } + +} +
diff -r 000000000000 -r ad6713197fd2 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon May 07 20:03:47 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/5571c4ff569f \ No newline at end of file