![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
A simple program to Toggle the 2 OnBoard LEDs.
Fork of Blinky_Led2 by
Diff: main.cpp
- Revision:
- 0:889636b54b07
- Child:
- 1:c8bf330e87ba
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue May 15 14:43:30 2018 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" + +DigitalOut led2(LED2); +DigitalOut led1(LED1); + +// main() runs in its own thread in the OS +int main() +{ + led1 = 1; + led2 = 0; + + while (true) + { + led2 = !led2; + led1 = !led1; + wait(0.5); + } +} +