Go Down

Topic: dmx controlled colorshield (Read 877 times) previous topic - next topic

gaggenau

hi
im thinking of dmx controlling a 8x8 rgb led matrix using a colorshield and the colorduino library. my biggest issue right now is how to write the code to take the dmx channels 1-512 without writing code for every pixel to point to the x,y axis of the pixels.

im going to use 192 dmx channels but i guess i need some sort of algoritm to "tell " the pixels wich channels to use.
every pixel needs three channels so every third channel is a new pixel

first i thought of using counting to do the trick but this will just work for one row.
like this

Code: [Select]
void loop(){

   for (Count = 0; Count<=189; Count +=3){
    Tred = DmxField[Count];
    Tgreen = DmxField[Count+1];
    Tblue = DmxField[Count+2];
Colorduino.SetPixel(Count,1,Tred,Tgreen,Tblue);
   }

Colorduino.FlipPage(); // swap screen buffers to show it
}



right now im out of ideas so
whats the easiest way of solving this?

/Gustaf



Go Up