Basic RGB library for non-PWM LEDs
Dependents: MenuExample exosite_http_example exosite_http_example FastPWM
Warning : Works with non-PWM LED (0 or 1).
A quick example on how to use it.
#include "mbed.h" #include "RGBLed.h" RGBLed led(LED_RED, LED_GREEN, LED_BLUE); int main() { RGBLed::Color list[8] = {RGBLed::BLACK, RGBLed::RED, RGBLed::GREEN, RGBLed::BLUE, RGBLed::MAGENTA, RGBLed::CYAN, RGBLed::YELLOW, RGBLed::WHITE}; int i = 0; while (true) { i = (i+1)%8; led.setColor(list[i]); wait_ms(100); } }
History
Fixed the documentation in RGBLed.h
2015-06-12, by rominos2 [Fri, 12 Jun 2015 19:02:04 +0000] rev 6
Fixed the documentation in RGBLed.h
Add #ifndef on headers
2014-09-03, by rominos2 [Wed, 03 Sep 2014 19:32:25 +0000] rev 5
Add #ifndef on headers
Added License headers.
2014-09-03, by rominos2 [Wed, 03 Sep 2014 10:46:40 +0000] rev 4
Added License headers.
Change the Library name for better understanding.; Change some data type for optimization.
2014-09-03, by rominos2 [Wed, 03 Sep 2014 10:13:45 +0000] rev 3
Change the Library name for better understanding.; Change some data type for optimization.
Change from pointer to reference for the setColor method.
2014-09-02, by rominos2 [Tue, 02 Sep 2014 21:55:22 +0000] rev 2
Change from pointer to reference for the setColor method.
API Documentation Update
2014-09-02, by rominos2 [Tue, 02 Sep 2014 21:34:05 +0000] rev 1
API Documentation Update
Initial Release
2014-09-02, by rominos2 [Tue, 02 Sep 2014 13:05:51 +0000] rev 0
Initial Release