![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
blink_led
blink_led.cpp
- Committer:
- anhquan
- Date:
- 2018-07-12
- Revision:
- 0:d833802907f3
File content as of revision 0:d833802907f3:
#include "mbed.h" DigitalOut gpo(D0); DigitalOut led(LED_RED); DigitalOut led2(LED_GREEN); int main() { while(1) { gpo = !gpo; // toggle pin for(int i =0 ; i< 5 ; i++) { led = !led; // toggle led wait(0.2f); } for(int i =0 ; i<5 ; i++) { led2 = !led2; wait(0.2f); } } }