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.

Dependencies:   Debounced mbed

Fork of Tarea1-V2 by junior andres calle acevedo

Revision:
0:330f1919c7a5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Mar 26 14:39:53 2014 +0000
@@ -0,0 +1,20 @@
+#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);
+        
+    }
+}
\ No newline at end of file