"Fun with LEDs" example project, for use with FRDM-KL25Z insert

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
clarkjarvis
Date:
Tue Oct 22 16:49:06 2013 +0000
Commit message:
Fun with LEDs on KL25Z - LED Color Mixing Demo

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 22 16:49:06 2013 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+PwmOut blue(LED_BLUE);
+PwmOut green(LED_GREEN);
+PwmOut red(LED_RED);
+
+int main() {
+    while(1) {
+        // Mix Colors! 
+        // Use any number between 0 (100% ON) and 1 (OFF).
+        blue = 0.75;   // Blue mostly OFF
+        red = 0.25;   // Red mostly ON
+        green = 1.0;   // Green OFF
+        wait(0.1);   // wait for 100ms
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Oct 22 16:49:06 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file