hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.7k stars 1.17k forks source link

5 panels 32x16 #552

Open ostium opened 6 years ago

ostium commented 6 years ago

Hello, I'm trying to build a video-wall with 5 panels 16x32, like image below, with 480mm (length) x 192mm (height).

whatsapp image 2018-03-08 at 17 04 13

It is possible to do this?

I have all panels wired up, and i can execute "sudo examples-api-use/demo -D0" without problems, but now I don't know how to configure this setup.

Please, can someone help me?

Thanks in advance :-)

hzeller commented 6 years ago

Yes, you can do this. I suppose you have 5 panels with 32x16 and you chain them all together in one chain ? Your parameters would be

--led-rows=16 --led-cols=32 --led-chain=5

Depending on if these are outdoor panels or not, you might need to have to choose a--led-multiplexing=xxxparameter.

Given that you have a the LED panels not in their natural orientation (which is over the 32 width, and clocked from a Pi on the right), you need to write a PixelMapper that does the coordinate mapping.

ostium commented 6 years ago

My setup is this: 80 columns and 32 lines: whatsapp image 2018-03-08 at 17 28 03

but, if I execute this, the image is not in landscap format: sudo ./demo -t 10 -D 1 runtext.ppm --led-gpio-mapping=classic-pi1 --led-rows=16 --led-cols=32 --led-chain=5

whatsapp image 2018-03-08 at 17 31 34

Maybe is a rotational problem on software? Where I can change this?

Thanks

ostium commented 6 years ago

Sorry, I didn't read all off your response... "you need to write a PixelMapper that does the coordinate mapping."

angelogoncalve commented 6 years ago

Use this transformer to 32x16 panel:

void SArrangementTransformer::TransformCanvas::SetPixel( int x, int y, uint8_t red, uint8_t green, uint8t blue) { if (x < 0 || x >= width || y < 0 || y >= height_) return; const int slabheight = virtualrowspanelheight; // one folded s-shape const int base_y = (y / slab_height) panelheight; y %= slab_height; if (y < panelheight) { x += delegatee_->width()*2/3 ;

 }

if ((y < 2panelheight ) && (y >= panelheight)) { x = 2width_ - x - 1; y = slab_height *2/3 - y - 1;

}

if ((y < 3panelheight ) && (y >=2 panelheight)) {

 y =  y - slab_height*2/3 ;

} delegatee_->SetPixel(x, base_y + y, red, green, blue); }

angelogoncalve commented 6 years ago

You can try to rotate the image doing this function:

def rotate_image(self, image, angle): return image.convert("RGB").rotate(angle)

ostium commented 6 years ago

@angelogoncalve

Hello, thank you for the help... your #611 save my day! It works very well!