Skip to content

Commit 04c3bcd

Browse files
authored
Merge pull request #1764 from FoamyGuy/pygamer_improved_thermal_cam_cp7
cp7 version of OnDiskBitmap usage for improved pygamer thermal cam
2 parents a63e336 + 3e86890 commit 04c3bcd

File tree

1 file changed

+10
-1
lines changed
  • PyGamer_Improved_Thermal_Camera

1 file changed

+10
-1
lines changed

PyGamer_Improved_Thermal_Camera/code.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,23 @@
6161
i2c = busio.I2C(board.SCL, board.SDA, frequency=400000)
6262
amg8833 = adafruit_amg88xx.AMG88XX(i2c)
6363

64-
# Display spash graphics
64+
# CircuitPython 6 & 7 compatible
65+
# Display splash graphics
6566
with open("/thermal_cam_splash.bmp", "rb") as bitmap_file:
6667
bitmap = displayio.OnDiskBitmap(bitmap_file)
6768
splash = displayio.Group(scale=display.width // 160)
6869
splash.append(displayio.TileGrid(bitmap, pixel_shader=getattr(bitmap, 'pixel_shader', displayio.ColorConverter())))
6970
display.show(splash)
7071
time.sleep(0.1) # Give the splash graphic some time to display
7172

73+
# # CircuitPython 7+ compatible
74+
# Display splash graphics
75+
# splash = displayio.Group(scale=display.width // 160)
76+
# bitmap = displayio.OnDiskBitmap("/thermal_cam_splash.bmp")
77+
# splash.append(displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader))
78+
# board.DISPLAY.show(splash)
79+
# time.sleep(0.1) # Allow the splash to display
80+
7281
# Set up ulab arrays
7382
n = 8 # Thermal sensor grid axis size; AMG8833 sensor is 8x8
7483
sensor_data = ulab.array(range(n * n)).reshape((n, n)) # Color index narray

0 commit comments

Comments
 (0)