![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is a LED Demo for linknode
Fork of mbed_blinky by
Diff: main.cpp
- Revision:
- 10:70f2c2e85c7f
- Parent:
- 4:81cea7a352b0
--- a/main.cpp Thu Oct 29 12:28:39 2015 +0000 +++ b/main.cpp Wed Apr 13 12:12:04 2016 +0000 @@ -1,12 +1,17 @@ #include "mbed.h" -DigitalOut myled(LED1); +DigitalOut led_g(P0_19); +DigitalOut led_r(P0_18); -int main() { - while(1) { - myled = 1; - wait(0.2); - myled = 0; - wait(0.2); +int main() +{ + while(1) + { + led_g = 1; + led_r = 0; + wait(1); + led_g = 0; + led_r = 1; + wait(1); } }