CHANG rozen
/
LED
LED binkly
Revision 0:6e75cf3220cb, committed 2017-10-19
- Comitter:
- rozendhyan
- Date:
- Thu Oct 19 12:36:02 2017 +0000
- Commit message:
- Testing on board;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 6e75cf3220cb main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 19 12:36:02 2017 +0000 @@ -0,0 +1,21 @@ +#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); + } +} +
diff -r 000000000000 -r 6e75cf3220cb mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 19 12:36:02 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/b484a57bc302 \ No newline at end of file