Práctica 2 Ejercicio 6
Dependencies: mbed
Revision 0:c454cf4fb510, committed 2017-11-03
- Comitter:
- anderibabe
- Date:
- Fri Nov 03 14:23:57 2017 +0000
- Commit message:
- Pr?ctica 2 Ejercicio 6
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 c454cf4fb510 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Nov 03 14:23:57 2017 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" + +Timer timer1; +Timer timer2; +Timer timer3; +DigitalOut Led1(PB_3); // Led1 conectado al pin D3 +DigitalOut Led2(PB_5); // Led2 conectado al pin D4 +DigitalOut Led3(PB_4); // Led3 conectado al pin D5 +int cont1,cont2,cont3,end1,end2,end3; + +int main() +{ + timer1.start(); + timer2.start(); + timer3.start(); +cont1= timer1.read.us(); //tiempo pasado en ms +cont2= timer1.read.us(); //tiempo pasado en ms +cont3= timer1.read.us(); //tiempo pasado en ms +end1=; // Frecuencia 1s +end2=; // Frecuencia 1,2s +end3=; // Frecuencia 1,5s + while(1) { + if (cont1=end1) + { + + } + wait(1); + } +}
diff -r 000000000000 -r c454cf4fb510 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Nov 03 14:23:57 2017 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/fb8e0ae1cceb \ No newline at end of file