creo que es otro ticker
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:170563028efc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Apr 09 14:06:52 2019 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" +//Hacer la siguiente secuencia Rojo 0.1ON, 0.9OFF + +DigitalOut myled(LED1); + +Ticker maver; + +void charin (){ + static int i = 0; + myled = 1; + i++; + if(i == 9){ + myled = 0; + i = 0; + } + + } + +int main() { + + maver.attach (&charin, 0.1); + + while(1) { + } +}