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:
- 1:4011df68bd01
- Parent:
- 0:1b2cc5f10340
- Child:
- 2:bb6b19e543c9
diff -r 1b2cc5f10340 -r 4011df68bd01 main.cpp --- a/main.cpp Thu Oct 24 20:08:14 2013 +0000 +++ b/main.cpp Fri Oct 25 19:50:06 2013 +0000 @@ -4,18 +4,22 @@ DigitalOut led2(LED2); int reps = 100; //modifica este valor para hacer la secuencia mas rapida o lenta +int count; int main() { while(1) { led1 = 0; //enciendo led azul + count = 0; while(count < reps){ //equivalente a un wait de aprox 100 ms porque hago 100 veces pausa de 1 ms wait(0.001); } + count = 0; 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 + } }