diff options
| author | Bryan Siepert <bsiepert@gmail.com> | 2019-03-02 09:12:40 -0800 |
|---|---|---|
| committer | Bryan Siepert <bsiepert@gmail.com> | 2019-03-02 09:12:40 -0800 |
| commit | 945550f4bd8f6654b1da130a4e5c78bf2183050c (patch) | |
| tree | bcc962649b16cecc898a18da4e92d94402353c19 /shared-bindings/displayio/OnDiskBitmap.c | |
| parent | 17bf2afa414d605676643be301a05d74c3b68290 (diff) | |
Fixed the OnDiskBitmap example to reflect code changes
Diffstat (limited to 'shared-bindings/displayio/OnDiskBitmap.c')
| -rw-r--r-- | shared-bindings/displayio/OnDiskBitmap.c | 9 |
1 files changed, 5 insertions, 4 deletions
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: |
