Code: Select all
display_bus = displayio.FourWire(spi, command=board.GP20, chip_select=board.GP22, reset=board.GP21, baudrate=100000000)
display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240, auto_refresh=False)
cb = displayio.Bitmap(320,240,1_)
cp = displayio.Palette(1)
bgs=displayio.TileGrid(cb, pixel_shader=cp, x=0, y=0)
group.append(bgs)
while True:
cp[0] = 0xFF0000
display.refresh()
cp[0] = 0x0000FF
display.refresh()
Code: Select all
while True:
display_bus.send(0x2A, b"\0\0\x01\x40")
display_bus.send(0x2b, b"\0\0\0\xf0")
display_bus.send(0x2c, b"\xFC\0"*240*320)
display_bus.send(0x2A, b"\0\0\x01\x40")
display_bus.send(0x2b, b"\0\0\0\xf0")
display_bus.send(0x2c, b"\0\x3F"*240*320)