Hi all.
I am using the 3.0 version of the rainbowduino firmware and I cannot turn on more than 64 leds at one time. Could someone explain to me what I am doing wrong?
In more detail, I am using 4 rainbowduinos to control an led board that has 21x32 single colour leds. If we ignore the other three rainbowduinos here is what I have observed:
1 rainbowduino maps to 6 columns of 32 leds. I can turn on 2 columns of 32 leds. If I instruct the device to turn a few columns on, then it will only enable the last two. Here is a code snippet:
void ColumnOn(byte col, byte brightness)
{
byte Addr = AR1;
if(col<6)
Addr = AR1;
else if (col>=6 && col<12)
Addr = AR2;
else if (col>=12 && col<18)
Addr = AR3;
else
Addr = AR4;
byte ardCol = col%6;
if(ardCol < 2)
sendCMD(Addr, CMD_SET_INK, brightness, 0x0, 0x0);
else if(ardCol==2 || ardCol==3)
sendCMD(Addr, CMD_SET_INK, 0x0, brightness, 0x0);
else
sendCMD(Addr, CMD_SET_INK, 0x0, 0x0, brightness);
byte sInd = col%2 * 4;
byte eInd = sInd + 4;
for (byte pin = sInd; pin < eInd; pin++)
{
sendCMD(Addr, CMD_DRAW_PIXEL, toByte(pin), toByte(0));
sendCMD(Addr, CMD_DRAW_PIXEL, toByte(pin), toByte(1));
sendCMD(Addr, CMD_DRAW_PIXEL, toByte(pin), toByte(2));
sendCMD(Addr, CMD_DRAW_PIXEL, toByte(pin), toByte(3));
sendCMD(Addr, CMD_DRAW_PIXEL, toByte(pin), toByte(4));
sendCMD(Addr, CMD_DRAW_PIXEL, toByte(pin), toByte(5));
sendCMD(Addr, CMD_DRAW_PIXEL, toByte(pin), toByte(6));
sendCMD(Addr, CMD_DRAW_PIXEL, toByte(pin), toByte(7));
}
}
I am sure that the device is capable of turning all rows on at the same time but I just cant figure out how to fix this issue.
Any advice would be very very appreciated.
thanks