first
This commit is contained in:
commit
9bd764579a
5 changed files with 123 additions and 0 deletions
0
lib/__init__.py
Normal file
0
lib/__init__.py
Normal file
24
lib/display.py
Normal file
24
lib/display.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue