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: mbed
Revision 0:5ef02a7b3cde, committed 2014-03-24
- Comitter:
- rcortes
- Date:
- Mon Mar 24 19:21:59 2014 +0000
- Commit message:
- Blink until Timeout
Changed in this revision
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 5ef02a7b3cde main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Mar 24 19:21:59 2014 +0000 @@ -0,0 +1,29 @@ +//Blink until Timeout +#include "mbed.h" +#define ENC 0 +#define APG 1 +Timeout tiempofuera; + +DigitalOut rojo(LED_RED); +DigitalOut verde(LED_GREEN); + +int encendido=1; + +void hasta_tiempo() +{ + encendido=0; +} + +int main() +{ + tiempofuera.attach(&hasta_tiempo,5); + rojo=APG; + while(encendido) { + verde=!verde; + wait(0.2); + } + while(true) { + rojo=ENC; + verde=APG; + } +}
diff -r 000000000000 -r 5ef02a7b3cde mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Mar 24 19:21:59 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1 \ No newline at end of file