25 lines
No EOL
612 B
Python
25 lines
No EOL
612 B
Python
import board
|
|
import displayio
|
|
import adafruit_imageload
|
|
|
|
display = board.DISPLAY
|
|
|
|
bitmap, palette = adafruit_imageload.load("/purple.bmp",
|
|
bitmap=displayio.Bitmap,
|
|
palette=displayio.Palette)
|
|
|
|
# Create a TileGrid to hold the bitmap
|
|
tile_grid = displayio.TileGrid(bitmap, pixel_shader=palette)
|
|
|
|
# Create a Group to hold the TileGrid
|
|
group = displayio.Group()
|
|
|
|
# Add the TileGrid to the Group
|
|
group.append(tile_grid)
|
|
|
|
# Add the Group to the Display
|
|
display.show(group)
|
|
|
|
# Loop forever so you can enjoy your image
|
|
while True:
|
|
pass |