Skip to content

Commit

Permalink
Tweak demo to use display w/h and 16bit buf
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jan 23, 2021
1 parent ab14406 commit d66f220
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions micropython/examples/pico_display/demo.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import time, random
import picodisplay as display

WIDTH = 240
HEIGHT = 135
width = display.get_width()
height = display.get_height()

display_buffer = bytearray(WIDTH * HEIGHT)
display_buffer = bytearray(width * height * 2) # 2-bytes per pixel (RGB565)
display.init(display_buffer)

display.set_backlight(1.0)
i = 0
width = display.get_width()
height = display.get_height()


class Ball:
def __init__(self, x, y, r, dx, dy, pen):
Expand Down

0 comments on commit d66f220

Please sign in to comment.