This commit is contained in:
Christoph Haas 2025-11-18 22:40:58 +01:00
commit 9bd764579a
5 changed files with 123 additions and 0 deletions

24
lib/display.py Normal file
View file

@ -0,0 +1,24 @@
from rgbmatrix import RGBMatrix, RGBMatrixOptions
# Das Bild nur speichern. Nicht die LED-Matrix ansteuern.
DEV = True
if not DEV:
options = RGBMatrixOptions()
options.rows = 64
options.cols = 64
options.chain_length = 2
options.parallel = 1
options.hardware_mapping = 'regular' # change if using Adafruit HAT, e.g. 'adafruit-hat'
options.gpio_slowdown = 4 # try 2, 4, or even 5
options.disable_hardware_pulsing = True
matrix = RGBMatrix(options=options)
matrix_width = 64 * options.chain_length
matrix_height = 64
def do(image):
if DEV:
image.save('image.png')
else:
matrix.SetImage(image)