probando el micro
Dependencies: mbed
main.cpp
- Committer:
- Franmaver
- Date:
- 2019-04-09
- Revision:
- 0:ea5cf5fc3581
File content as of revision 0:ea5cf5fc3581:
#include "mbed.h" DigitalOut rojo(LED1); DigitalOut verde(LED2); Ticker charo; void mav(){ static int i = 0, vez = 0; rojo = 1; verde = 1; i++; if(i == 9){ rojo = 0; i = 0; vez++; } if((i == 2) && (vez == 5)){ verde = 0; i = 0; vez = 0; } } int main() { charo.attach(&mav, 0.1); while(1) { } }