AVR USB RGB LED Controller

While working on an update for my CPU Usage LEDs project I thought why not just make it into a universal RGB LED controller? The CPU Usage LEDs controller took a value between 0 and 255, worked out what colour it should be and then fade to that colour. This was very limiting; changing what colours it used and how it fades required a firmware update. With this universal RGB LED controller the host software does all the work and the controller is simply told what brightness the red, green and blue LEDs should be.

To make it as easy as possible to interface with the controller I created a library which deals with all the LibUSB stuff. Only 10 lines of code is needed to get something basic running.


#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


Loading comments...
  1. « Prev
  2. Next »

Leave a Reply

Sorry, new comments have been disabled since I rarely have time to moderate and reply these days :(