forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Tested on a PyPortal with:
Adafruit CircuitPython 4.0.0-beta.6 on 2019-03-30; Adafruit PyPortal with samd51j20
Test code:
import board
import displayio
COLORS = 16
palette = displayio.Palette(COLORS)
palette[0] = 0x000000
palette[1] = 0xFFFFFF
bitmap = displayio.Bitmap(320, 240, COLORS)
bitmap[(100, 100)] = 1
bitmap[(100, 101)] = 1
bitmap[(101, 100)] = 1
bitmap[(101, 101)] = 1
tile_grid = displayio.TileGrid(bitmap, pixel_shader=palette)
group = displayio.Group()
group.append(tile_grid)
board.DISPLAY.show(group)
board.DISPLAY.refresh_soon()
run the above get the expected little square:
change this line to:
COLORS = 17