código solenoide 0 e 1
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:ad6713197fd2
--- /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); + } + +} +