Rainbowduino: Accessing individual ports (cascaded system)

I want to use the ports of multiple Rainbowduino’s to control led’s (but not a led matrix). I understand how to wire this up (led current sinks vs Darlington voltage sources). However, I am finding getting my head around the code tricky…

I am not interested in mtXcontrol or other serial based systems, I just want to be able to simply control all the pwm outputs of multiple rainbowduinos cascaded - Ideally some extrapolation that would mean I would control the outputs like analogWrite() on the Arduino.

Has anybody got a simple sketch to make all the pins blink, or make each output turn on one by one?




I have found:


Which contains “Rainbowduino Demo code with Serial interface” - rainbowduino_v1_0_5.zip

Within the code seems some demo code which has what I want… will have a look now


I think the main thing that confuses people is that the hardware does not do PWM at all, it is done in software, and the rows in the 8x8 display are multiplexed because there are only 24 channels.

If you want to PWM each individual output then you need to have more or less what the Rainbow_CMD_V2_0 has, which is a frame buffer with bits mapped to 0-15 (brightness) for each LED, and an interrupt service routine that does PWM for each LED based on the contents of this buffer and multiplexes the 8 rows.

If you want to see the absolute basics of how to control small numbers of individual LEDs using the 24-bit shift register look at the code in this blog entry: seeedstudio.com/blog/2009/07 … led-strip/