kenschneider18/rpi-metro-display

Modifying for 2x2 matrix

Closed this issue · 2 comments

Hi,

Thanks for the awesome tutorial! So, I have a 2x2 matrix of LED screens as opposed to your 1x2. I am wondering how to modify the code accordingly. It works just fine as a 1x2 display, but when I modify the options.parallel or other similar parameters in incidents.py and rpi-metro-display.py to try and accommodate a 2x2 display, the code doesn't work anymore and continues to draw Iike it's a 1x2 display.

When I wrote this I hadn't considered trying to accommodate different display dimensions so there are a lot of hard coded values hanging around. Since the API only returns 3 train times, you'll probably want to grab a larger font file from rpi-rgb-led-matrix.

For the main display screen (metro times) all you should need to do is change the hard coded values in draw_display to accommodate the larger font and increased display area.

The incident screens (service advisory/scheduled track work) are trickier because a lot more calculation is being done on the fly to draw the alert but it's the same idea. The incidents code is here.

Does that help?

Closing this due to inactivity.