code.py
 1  # SPDX-FileCopyrightText: 2019 Carter Nelson for Adafruit Industries
 2  #
 3  # SPDX-License-Identifier: MIT
 4  
 5  import board
 6  import displayio
 7  
 8  display = board.DISPLAY
 9  
10  # Setup the file as the bitmap data source
11  bitmap = displayio.OnDiskBitmap("/purple.bmp")
12  
13  # Create a TileGrid to hold the bitmap
14  tile_grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader)
15  
16  # Create a Group to hold the TileGrid
17  group = displayio.Group()
18  
19  # Add the TileGrid to the Group
20  group.append(tile_grid)
21  
22  # Add the Group to the Display
23  display.show(group)
24  
25  # Loop forever so you can enjoy your image
26  while True:
27      pass