wang tang
/
LEDandButton
LED and button system
Fork of LED by
main.cpp
- Committer:
- rozendhyan
- Date:
- 2017-10-19
- Revision:
- 0:6e75cf3220cb
- Child:
- 1:59cafc988b1c
File content as of revision 0:6e75cf3220cb:
#include "mbed.h" DigitalOut led1(D4); DigitalOut led2(D5); DigitalOut led3(D6); void LED_Blinkly(DigitalOut led1,DigitalOut led2,DigitalOut led3); // main() runs in its own thread in the OS int main() { LED_Blinkly(led1, led2, led3); } void LED_Blinkly(DigitalOut led1,DigitalOut led2,DigitalOut led3){ while(true){ led1 =! led1; wait(0.5); led2 =! led2; wait(0.5); led3 =! led3; wait(0.5); } }