Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DebouncedIn mbed
Revision 0:574647369d62, committed 2014-03-26
- 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
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