este programa aumenta el ciclo de dureza de encendido del led

Dependencies:   Debounced mbed

Files at this revision

API Documentation at this revision

Comitter:
mescobart22
Date:
Fri Mar 21 16:27:59 2014 +0000
Commit message:
este es el ejercicio de la tarea 1

Changed in this revision

Debounced.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Debounced.lib	Fri Mar 21 16:27:59 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/WarwickRacing/code/Debounced/#8992c13bbb9b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Mar 21 16:27:59 2014 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "DebouncedIn.h"
+
+DigitalOut myled(LED1);
+DebouncedIn button1(PTC12);
+float tiempoespera=0.1;
+
+int main() {
+    while(1) {
+        myled=!myled;
+        if  (button1.falling()){
+            if (tiempoespera+0.1<1)
+                tiempoespera=tiempoespera+0.1;
+            else
+                tiempoespera=0.1;
+        }
+        wait(tiempoespera);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Mar 21 16:27:59 2014 +0000
@@ -0,0 +1,1 @@
+http://world3.dev.mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43
\ No newline at end of file