Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Voice2Json_Edge_Detection/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down