forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
I worked with displayio on my PyGamer a bit and discovered that the example on this page does not work.
I worked on this example with my PyGamer and have a new version of the script that does work:
import board
import displayio
import time
import pulseio
board.DISPLAY.auto_brightness = False
board.DISPLAY.brightness = 0
splash = displayio.Group()
board.DISPLAY.show(splash)
with open("/sample.bmp", "rb") as f:
odb = displayio.OnDiskBitmap(f)
face = displayio.TileGrid(odb, pixel_shader=displayio.ColorConverter(), width=160, height=128, x=0, y=0)
splash.append(face)
board.DISPLAY.show(splash)
# Fade up the backlight
for i in range(100):
board.DISPLAY.brightness = 0.01 * i
time.sleep(0.05)
# Wait forever
while True:
passMetadata
Metadata
Assignees
Labels
No labels