diff --git a/Voice2Json_Edge_Detection/demo.py b/Voice2Json_Edge_Detection/demo.py index 3dbf7ef65..ac3e034d0 100644 --- a/Voice2Json_Edge_Detection/demo.py +++ b/Voice2Json_Edge_Detection/demo.py @@ -53,8 +53,14 @@ def load_image(path): "Load an image from the path" if len(splash): splash.pop() + # CircuitPython 6 & 7 compatible bitmap = displayio.OnDiskBitmap(open(path, "rb")) sprite = displayio.TileGrid(bitmap, pixel_shader=getattr(bitmap, 'pixel_shader', displayio.ColorConverter())) + + # # CircuitPython 7+ compatible + # bitmap = displayio.OnDiskBitmap(path) + # sprite = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader) + splash.append(sprite) def change_light_color(lightname, color): @@ -99,7 +105,7 @@ def process_output(line): backlight_pin=tft_lite, ) -splash = displayio.Group(max_size=10) +splash = displayio.Group() display.show(splash) for output_line in shell_command(listen_command):