From 945550f4bd8f6654b1da130a4e5c78bf2183050c Mon Sep 17 00:00:00 2001 From: Bryan Siepert Date: Sat, 2 Mar 2019 09:12:40 -0800 Subject: Fixed the OnDiskBitmap example to reflect code changes --- shared-bindings/displayio/OnDiskBitmap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'shared-bindings/displayio/OnDiskBitmap.c') diff --git a/shared-bindings/displayio/OnDiskBitmap.c b/shared-bindings/displayio/OnDiskBitmap.c index 8b75eb00c..bf00ef855 100644 --- a/shared-bindings/displayio/OnDiskBitmap.c +++ b/shared-bindings/displayio/OnDiskBitmap.c @@ -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: -- cgit v1.2.3