simpletest.py
1 #!/usr/bin/python3 2 """ 3 Display a static 64x64 image 4 5 This assumes two 64x32 matrix panels are hooked together in the "serpentine" configuration. 6 7 Run like this: 8 9 $ python simpletest.py 10 11 The image is displayed until the user hits enter to exit. 12 """ 13 14 import pathlib 15 16 import adafruit_raspberry_pi5_piomatter 17 import numpy as np 18 import PIL.Image as Image 19 20 geometry = adafruit_raspberry_pi5_piomatter.Geometry(width=64, height=64, n_addr_lines=4, rotation=adafruit_raspberry_pi5_piomatter.Orientation.Normal) 21 framebuffer = np.asarray(Image.open(pathlib.Path(__file__).parent / "blinka64x64.png")) 22 matrix = adafruit_raspberry_pi5_piomatter.AdafruitMatrixBonnetRGB888Packed(framebuffer, geometry) 23 matrix.show() 24 25 input("Hit enter to exit")