Clark Jarvis
/
KL25Z_LED_FUN
"Fun with LEDs" example project, for use with FRDM-KL25Z insert
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 PwmOut blue(LED_BLUE); 00003 PwmOut green(LED_GREEN); 00004 PwmOut red(LED_RED); 00005 00006 int main() { 00007 while(1) { 00008 // Mix Colors! 00009 // Use any number between 0 (100% ON) and 1 (OFF). 00010 blue = 0.75; // Blue mostly OFF 00011 red = 0.25; // Red mostly ON 00012 green = 1.0; // Green OFF 00013 wait(0.1); // wait for 100ms 00014 } 00015 }
Generated on Sat Jul 23 2022 13:52:51 by 1.7.2