8000 Fixed the OnDiskBitmap example to reflect code changes · zencuke/circuitpython@945550f · GitHub
[go: up one dir, main page]

Skip to content

Commit 945550f

Browse files
committed
Fixed the OnDiskBitmap example to reflect code changes
1 parent 17bf2af commit 945550f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

shared-bindings/displayio/OnDiskBitmap.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,22 @@
5252
//| import time
5353
//| import pulseio
5454
//|
55-
//| backlight = pulseio.PWMOut(board.TFT_BACKLIGHT)
55+
//| board.DISPLAY.auto_brightness = False
56+
//| board.DISPLAY.brightness = 0
5657
//| splash = displayio.Group()
5758
//| board.DISPLAY.show(splash)
5859
//|
5960
//| with open("/sample.bmp", "rb") as f:
6061
//| odb = displayio.OnDiskBitmap(f)
61-
//| face = displayio.Sprite(odb, pixel_shader=displayio.ColorConverter(), position=(0,0))
62+
//| face = displayio.TileGrid(odb, pixel_shader=displayio.ColorConverter(), position=(0,0))
6263
//| splash.append(face)
6364
//| # Wait for the image to load.
6465
//| board.DISPLAY.wait_for_frame()
6566
//|
6667
//| # Fade up the backlight
6768
//| for i in range(100):
68-
//| backlight.duty_cycle = i * (2 ** 15) // 100
69-
//| time.sleep(0.01)
69+
//| board.DISPLAY.brightness = 0.01 * i
70+
//| time.sleep(0.05)
7071
//|
7172
//| # Wait forever
7273
//| while True:

0 commit comments

Comments
 (0)
0