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
15 changes: 14 additions & 1 deletion RBG_Matrix/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,24 @@
display.show(g)
display.auto_refresh = True


# CircuitPython 6 & 7 compatible
bitmap_file = open("/rbg.bmp", "rb")
# Setup the file as the bitmap data source
bitmap = displayio.OnDiskBitmap(bitmap_file)
# Create a TileGrid to hold the bitmap
tile_grid = displayio.TileGrid(bitmap, pixel_shader=getattr(bitmap, 'pixel_shader', displayio.ColorConverter()))
tile_grid = displayio.TileGrid(
bitmap,
pixel_shader=getattr(bitmap, 'pixel_shader', displayio.ColorConverter())
)

# # CircuitPython 7+ compatible
# # Setup the filename as the bitmap data source
# bitmap = displayio.OnDiskBitmap("/rbg.bmp")
# # Create a TileGrid to hold the bitmap
# tile_grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader)


print(dir(tile_grid))

while True:
Expand Down