Fixed the OnDiskBitmap example to reflect code changes

This commit is contained in:
Bryan Siepert 2019-03-02 09:12:40 -08:00
parent 17bf2afa41
commit 945550f4bd
1 changed files with 5 additions and 4 deletions

View File

@ -52,21 +52,22 @@
//| import time
//| import pulseio
//|
//| backlight = pulseio.PWMOut(board.TFT_BACKLIGHT)
//| 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.Sprite(odb, pixel_shader=displayio.ColorConverter(), position=(0,0))
//| face = displayio.TileGrid(odb, pixel_shader=displayio.ColorConverter(), position=(0,0))
//| splash.append(face)
//| # Wait for the image to load.
//| board.DISPLAY.wait_for_frame()
//|
//| # Fade up the backlight
//| for i in range(100):
//| backlight.duty_cycle = i * (2 ** 15) // 100
//| time.sleep(0.01)
//| board.DISPLAY.brightness = 0.01 * i
//| time.sleep(0.05)
//|
//| # Wait forever
//| while True: