Go Down

Topic: Rainbowduino Firmware (Read 430 times) previous topic - next topic

I am working with a Arduino <> Rainbowdruino connected via i2c setup.

[1] I am searching for a Rainbowdruino Firmeware that offeres a functions that takes a full 8x8 rgb frame and displays it.

[2] I am using the Rainbow_CMD_V2_0 *, and I would like to know how the dots_color array exactly works. So that I could write such a function by my own.


* http://code.google.com/p/rainbowduino/source/browse/trunk/Rainbow_commandVersion_Beta/Rainbow_CMD_V2_0/Rainbow_CMD_V2_0.pde?r=2


johnwasser


I would like to know how the dots_color array exactly works. So that I could write such a function by my own.


The dots_color array stores four bits of brightness for each LED.  Because it only uses 4 bits (16 levels) it can cram values for two LEDs into a single byte.  That's why it uses only 4 bytes per row per color:
Code: [Select]

const int Frames = 2;
const int Colors = 3;
const int Rows = 8;
const int PixelPairs = 4;
unsigned char dots_color[Frames][Colors][Rows][PixelPairs];

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

hm could you describe this a bit more detailed? maybe with an example? this would be very nice

Go Up