This code will give a basic idea on how to control the onboard tri colour LED for the Freescale KL25Z Freedom board.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Aminpro
Date:
Sat Sep 14 19:57:14 2013 +0000
Commit message:
This code will give a basic idea on how to control the on board tri colour LED on the KL25Z Freedom 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 57326fa2810a main.cpp
--- /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);  
+    
+    
+    }
+
+
+ }
+
diff -r 000000000000 -r 57326fa2810a mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Sep 14 19:57:14 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9c8f0e3462fb
\ No newline at end of file