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.
Diff: main.cpp
- Revision:
- 0:1b2cc5f10340
- Child:
- 1:4011df68bd01
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 24 20:08:14 2013 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" + +DigitalOut led1(LED1); +DigitalOut led2(LED2); + +int reps = 100; //modifica este valor para hacer la secuencia mas rapida o lenta + +int main() { + while(1) { + led1 = 0; //enciendo led azul + while(count < reps){ //equivalente a un wait de aprox 100 ms porque hago 100 veces pausa de 1 ms + wait(0.001); + } + led1 = 1; //apago led1 + led2 = 0; //enciendo led2 + while(count < reps){ //equivalente a un wait de aprox 100 ms + wait(0.001); + } + led2 = 1; //apago led2 + } +}