Tarea1-Versión2. Uso de un botón para disminuir el tiempo de encendido y apagado de un LED con una propuesta de código alternativa.
Fork of Tarea1-V2 by
main.cpp
- Committer:
- juniorACA
- Date:
- 2014-03-26
- Revision:
- 0:330f1919c7a5
File content as of revision 0:330f1919c7a5:
#include "mbed.h" #include "DebouncedIn.h" DebouncedIn puls(PTC12); DigitalOut myled(LED1); float k=0; float t=0.2; int main() { while(1) { if(puls.falling()){ ++k; t=0.2*(k*1.1); } myled = !myled; wait(t); } }