JOSE ALBERTO RUIZ, SEBASTIAN PELAEZ LENTEJA // Programa que incrementa en 10% el periodo de una señal por medio de pulsaciones, El pulsador está entre el pin PTC11 y GND / This program increases 10% the period of a square signal via keystrokes.Button is connected between pin PTC11 and GND // JOSE RUIZ, UNALMED 2014

Dependencies:   DebouncedIn mbed

Files at this revision

API Documentation at this revision

Comitter:
jaruiz
Date:
Wed Mar 26 05:00:53 2014 +0000
Commit message:
Tarea 1 Procesadores, programa que incrementa en 10% el periodo de una se?al cuadrada que enciende el led por medio de pulsaciones, el pulsador est? conectado entre pines PTC11 y GND /This program increases 10% the signal period by keystrokes /UNAL

Changed in this revision

DebouncedIn.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
diff -r 000000000000 -r 574647369d62 DebouncedIn.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DebouncedIn.lib	Wed Mar 26 05:00:53 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/cmorab/code/DebouncedIn/#dc1131de43e8
diff -r 000000000000 -r 574647369d62 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Mar 26 05:00:53 2014 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "stdio.h"
+#include "DebouncedIn.h" 
+ 
+DigitalOut led(LED1);
+ 
+DebouncedIn pulsador(PTC11);
+ 
+float t;  
+int main() {
+    while(1) {
+        led=!led;
+        if  (pulsador.falling()){
+            if (t+0.1<1)
+                t=t+0.1;
+            else
+                t=0.1;
+        }
+        wait(t);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 574647369d62 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Mar 26 05:00:53 2014 +0000
@@ -0,0 +1,1 @@
+http://world3.dev.mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43
\ No newline at end of file