Pages: [1]   Go Down
Author Topic: dmx controlled colorshield  (Read 840 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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


Logged

Pages: [1]   Go Up
Jump to: