![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
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
00001 #include "mbed.h" 00002 #include "DebouncedIn.h" 00003 00004 DebouncedIn puls(PTC12); 00005 DigitalOut myled(LED1); 00006 00007 float k=0; 00008 float t=0.2; 00009 00010 int main() { 00011 while(1) { 00012 if(puls.falling()){ 00013 ++k; 00014 t=0.2*(k*1.1); 00015 } 00016 myled = !myled; 00017 wait(t); 00018 00019 } 00020 }
Generated on Sat Jul 16 2022 09:25:28 by
![doxygen](doxygen.png)