27 lines
601 B
Python
27 lines
601 B
Python
# SPDX-FileCopyrightText: 2019 Carter Nelson for Adafruit Industries
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
import board
|
|
import displayio
|
|
|
|
display = board.DISPLAY
|
|
|
|
# Setup the file as the bitmap data source
|
|
bitmap = displayio.OnDiskBitmap("/purple.bmp")
|
|
|
|
# Create a TileGrid to hold the bitmap
|
|
tile_grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader)
|
|
|
|
# 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
|