pulsador que retarda el tiempo de un pulso que enciende un led.

Dependencies:   DebouncedIn mbed

Revision:
0:611bdfe9022f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 03 04:07:35 2014 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "stdio.h"
+#include "DebouncedIn.h" 
+ 
+DigitalOut led(LED1);
+ 
+DebouncedIn pulsador(PTC5);
+ 
+float t;  
+int main() {
+    while(1) {
+        led=!led;
+        if  (pulsador.falling()){
+            if (t+0.1<1000)
+                t=t+0.1;
+            else
+                t=0.1;
+        }
+        wait(t);
+    }
+}
+    
\ No newline at end of file