normal edu: [07.11.06 10:53 ](07.11.06 10:53 )
Hi, I`m trying to control a matrix of 15x20 sparkplugs and draw some geometric forms on it via RS232,
is it possible to scan the renderer pixel info and send it to RS232
pixel by pixel? only on/off
or do it all with numerical data and generate circles, lines, etc?
i´ve been trying with spreads, but its no working,
thanks
lalo
Edit
normal West: [07.11.06 11:54 ](07.11.06 11:54 )
You might want to start a new post about your specific Q.
Not sure how you want to control 15 * 20 pixels direct on an RS232, but with some additional hardware it should work. Please post some links, as I am scratching the micro electronics surface.
What kind off info are you sending to the leds?? (only ON and OFF aka 0 and 1) or are we talking RGB here??
I/we have build (and controlled) a 60 x 6 RGB LEDwall, but that was controlled via DMX.
Just post a small example on how you control your LED array.
Hi,
thanks West,
actually, they are not leds, they are sparkplugs!
we may control it with an arduino and some high voltage relays, it´s been not easy at all.
I´m sending an example with processing, it scans the renderer window pixel by pixel with
for(int i=0; i <= matrix.width; i++){
for(int e=0; e<= matrix.height; e++){
micolor = matrix.get(i,e);
if(micolor == color(255)){
uno = 1;} else{
uno=0;}
println(i+ “,” + e + " " + uno);
and yes, this is only on/off (1/0),
that is what we need, scan the rendererDX9 (width 15- height 20) and if lightness = 1, send (a, b)= 1, else (a, b)=0,
what do you think?..
thanks!
this is the processing code:
///////////////////////////////////////////
color micolor;
PGraphics matrix;
int uno;
void setup(){
size(150,200,P3D);
matrix = createGraphics(15,20,P3D);
frameRate(4);
}
void draw(){
background(0,0,0);
matrix.beginDraw();
matrix.background(0,0,0);
matrix.stroke(255);
matrix.line(7,9,random(3),3);
matrix.line(7,9,random(3)+6,0);
matrix.line(7,9,random(3)+11,3);
matrix.line(7,9,random(3),15);
matrix.line(7,9,random(3)+6,20);
matrix.line(7,9,random(3)+11,15);
for(int i=0; i <= matrix.width; i++){
for(int e=0; e<= matrix.height; e++){
micolor = matrix.get(i,e);
if(micolor == color(255)){
uno = 1;} else{
uno=0;}
println(i+ "," + e + " " + uno);
}
}
matrix.endDraw();
image(matrix,0,0,width,height);
//matrix.endDraw();
}
////////////////////////////////////////////////////
15x20a.v4p (4.5 kB)