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.67k stars 1.17k forks source link

Panel Orientation Help #821

Open oliverdarvall opened 5 years ago

oliverdarvall commented 5 years ago

A few questions with regards to panel orientation:

  1. I have 8 32x16 panels that are connected into 2 parallel chains of 4 each, thus ending up with 128x32 display.

I would really prefer to install the panels in Portrait orientation and using a big font then display a single digit per panel. What I would like to achieve is the following:

image

#!/usr/bin/env python
from rgbmatrix import graphics
from rgbmatrix import RGBMatrix, RGBMatrixOptions
import time

options = RGBMatrixOptions()

options.hardware_mapping = "regular"
options.rows = 16
options.cols = 32
options.chain_length = 4
options.parallel = 2
options.row_address_type = 0
options.multiplexing = 3
options.pwm_bits = 11
options.brightness = 100
options.pwm_lsb_nanoseconds = 150
options.led_rgb_sequence = "RGB"
options.pixel_mapper_config = "Rotate:90"
options.gpio_slowdown = 2
options.disable_hardware_pulsing = False
options.drop_privileges = False

matrix = RGBMatrix(options = options)        

font = graphics.Font()
font.LoadFont("my.bdf") # Used otf2bdf to create big font that fills a 32x16 completely with a digit 

matrix.Clear()
graphics.DrawText(matrix, font, 1, matrix.height-1, graphics.Color(255, 255, 0), "12345678")

time.sleep(10)

Is this possible to achieve using the "Rotate" options ?

2. If I have 2 parallel chains of boards installed with 4x (32x16) board per chain, to give me an effective resolution of 128x32. Is it possible to then set the library to "handle" it as a 64x64 display, thus "breaking up" the long chain into shorter "chains" ?

oliverdarvall commented 5 years ago

Oh my ! Is the U-mapper the answer to my question 2 ?

angelogoncalve commented 5 years ago

Yes maybe can be the flag:

options.pixel_mapper_config = "U-mapper;Rotate:90"