Omar Téllez
/
frdm_patrulla
torreta de patrulla y claxon
Fork of frdm_excercise7 by
main.cpp
- Committer:
- rvazquezc
- Date:
- 2014-09-25
- Revision:
- 0:2190998da98e
- Child:
- 1:83ed31fe1049
File content as of revision 0:2190998da98e:
#include "mbed.h" #define on 0 #define off 1 DigitalOut azul(LED_BLUE); DigitalOut rojo(LED_RED); InterruptIn sw2(SW2); DigitalOut verde(LED_GREEN); void task(void); int main() {azul=on; rojo=off; while (true) { azul=!azul; rojo=!rojo; wait (1.0f); sw2.rise(&task); } } void task() {verde=on; wait (5.0f); }