USB RGB LED Controller Based on AVR Microcontroller

Why not upgrade the CPU usage LED project to a general-purpose RGB LED controller? The current CPU usage LED controller uses a value between 0 and 255 to calculate the color it should be and then fades to that color. This is indeed quite limited; changing the color and fading method requires firmware updates. In contrast, a general-purpose RGB LED controller can let the host software handle all the work, and the controller only needs to be told what brightness the red, green, and blue LEDs should be, providing greater flexibility and scalability.

To simplify interactions with the controller, I developed a library that wraps all LibUSB content. With this library, you can achieve basic functionality with just a few lines of code (only 10 lines).


#include <rgbledctrl.h> int main() { rgbledctrl_init(); rgbledctrl_find(); s_rgbled_device* rgbLed = rgbledctrl_open(); rgbledctrl_setR(rgbLed, 200); // Set red value to 200 rgbledctrl_close(rgbLed); return 0; }

The library also has support for reading and writing to the EEPROM of the controller. Class wrappers for C++ and C# .NET are also provided.

Download from GitHub
Documentation