This code will give a basic idea on how to control the onboard tri colour LED for the Freescale KL25Z Freedom board.
Diff: main.cpp
- Revision:
- 0:57326fa2810a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Sep 14 19:57:14 2013 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" + +DigitalOut r(LED_RED); +DigitalOut g(LED_GREEN); +DigitalOut b(LED_BLUE); + + +int main() { + + while(1){ + g= 1; + b = 1; + r = 0; + wait(1); + b = 1; + r = 1; + g = 0; + wait(1); + r = 1; + g = 1; + b = 0; + wait(1); + + + } + + + } +