cp7 version of OnDiskBitmap usage for improved pygamer thermal cam
This commit is contained in:
parent
1e64c043be
commit
3e868908c3
1 changed files with 10 additions and 1 deletions
|
|
@ -61,7 +61,8 @@ panel = GamePadShift(
|
|||
i2c = busio.I2C(board.SCL, board.SDA, frequency=400000)
|
||||
amg8833 = adafruit_amg88xx.AMG88XX(i2c)
|
||||
|
||||
# Display spash graphics
|
||||
# CircuitPython 6 & 7 compatible
|
||||
# Display splash graphics
|
||||
with open("/thermal_cam_splash.bmp", "rb") as bitmap_file:
|
||||
bitmap = displayio.OnDiskBitmap(bitmap_file)
|
||||
splash = displayio.Group(scale=display.width // 160)
|
||||
|
|
@ -69,6 +70,14 @@ with open("/thermal_cam_splash.bmp", "rb") as bitmap_file:
|
|||
display.show(splash)
|
||||
time.sleep(0.1) # Give the splash graphic some time to display
|
||||
|
||||
# # CircuitPython 7+ compatible
|
||||
# Display splash graphics
|
||||
# splash = displayio.Group(scale=display.width // 160)
|
||||
# bitmap = displayio.OnDiskBitmap("/thermal_cam_splash.bmp")
|
||||
# splash.append(displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader))
|
||||
# board.DISPLAY.show(splash)
|
||||
# time.sleep(0.1) # Allow the splash to display
|
||||
|
||||
# Set up ulab arrays
|
||||
n = 8 # Thermal sensor grid axis size; AMG8833 sensor is 8x8
|
||||
sensor_data = ulab.array(range(n * n)).reshape((n, n)) # Color index narray
|
||||
|
|
|
|||
Loading…
Reference in a new issue