Cube Hack part II (software)

I’ve created a Google code project with the snappy title of avr-usb-rgb-led. It is based on the hid-custom-rq example from AVR usb examples. I’ve added 3 new commands, one for each LED. It uses a software PWM to control the brightness of each LED based on the value set.

There is a coresponding program using libusb which allows you to send the commands, it simply allows you to set the colour of the cube with an RGB tuple on the command line.

To get the code you need to check out using subversion. To flash the chip you probably want to use the makefile.


6 thoughts on “Cube Hack part II (software)

  1. OK our little project group over at the forums got it compiled and working with linux now, after a few minor issues with permissions of the executable in question. It seems to access the usb device, superuser privileges are needed, why/how could this be? Anyway we found a workaround to this too, and now plans are to re-write my python notifier scripts to work with your USB notifier too.
    Further plans are to port these to Windows at a later point in time, could you recommend a C compiler for this task maybe? (I thought maybe MinGW, but since I still have no real clue about C I thought I’d better ask here)

    Just wanted to say thank you for inspiration and help, if you’d like to have a second nice “USB dongle” style notifier let me know I’ll gladly donate one. 😉

    keep it up,


  2. Hi Dave,

    I happened to talk to Scott Merryfield, author of “Scotts gmail notifier” software – which coincidentally is also a capslock notifier software 😉 – (see, and he agreed to include hardware support for your “avr-rgb-usb-led” device. But since I’ve not managed to get VisualC++ to compile anything at all (and I do not own a Mac do do the work with), I want to ask you if you could kindly provide a precompiled version of that “set-led.exe” so Scott can start toying with it (and the hardware I’m about to send him for the purpose).(?)



  3. Where is your code for software PWM? I’m having a hard time understanding it compared to (in my opinion) the relatively straightforward hardwarePWM.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s