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); } }
Changes
Revision | Date | Who | Commit message |
---|---|---|---|
6:9b7ee7ba4109 | 2015-06-12 | rominos2 | Fixed the documentation in RGBLed.h |
5:b125e5a28295 | 2014-09-03 | rominos2 | Add #ifndef on headers |
4:176363412797 | 2014-09-03 | rominos2 | Added License headers. |
3:be0a3c2ec426 | 2014-09-03 | rominos2 | Change the Library name for better understanding.; Change some data type for optimization. |
2:3c0889914cb2 | 2014-09-02 | rominos2 | Change from pointer to reference for the setColor method. |
1:d492c575de97 | 2014-09-02 | rominos2 | API Documentation Update |
0:0969a9e32945 | 2014-09-02 | rominos2 | Initial Release |