Skip to content

Update with root_group and fourwire for CP 9 compatibility #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Usage Example
import time
import board
import displayio
import fourwire
import adafruit_uc8151d

displayio.release_displays()
Expand All @@ -111,7 +112,7 @@ Usage Example
epd_reset = board.D5
epd_busy = None

display_bus = displayio.FourWire(
display_bus = fourwire.FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)
time.sleep(1)
Expand All @@ -127,7 +128,7 @@ Usage Example
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
g.append(t)

display.show(g)
display.root_group = g

display.refresh()

Expand Down
5 changes: 3 additions & 2 deletions examples/uc8151d_1.54_grayscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import board
import displayio
import busio
import fourwire
import adafruit_uc8151d

displayio.release_displays()
Expand All @@ -25,7 +26,7 @@
rst = board.GP12
busy = board.GP13

display_bus = displayio.FourWire(
display_bus = fourwire.FourWire(
busio.SPI(clk, si), command=dc, chip_select=cs, reset=rst, baudrate=1000000
)

Expand Down Expand Up @@ -64,5 +65,5 @@
g = displayio.Group()
t = displayio.TileGrid(bitmap, pixel_shader=palette)
g.append(t)
display.show(g)
display.root_group = g
display.refresh()
5 changes: 3 additions & 2 deletions examples/uc8151d_2.9_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import time
import board
import displayio
import fourwire
import adafruit_uc8151d

# Used to ensure the display is free in CircuitPython
Expand All @@ -24,7 +25,7 @@
epd_busy = board.D6

# Create the displayio connection to the display pins
display_bus = displayio.FourWire(
display_bus = fourwire.FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)
time.sleep(1) # Wait a bit
Expand Down Expand Up @@ -55,7 +56,7 @@
g.append(t)

# Place the display group on the screen
display.show(g)
display.root_group = g

# Refresh the display to have it actually show the image
# NOTE: Do not refresh eInk displays sooner than 180 seconds
Expand Down
5 changes: 3 additions & 2 deletions examples/uc8151d_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import time
import board
import displayio
import fourwire
import adafruit_uc8151d

displayio.release_displays()
Expand All @@ -25,7 +26,7 @@
epd_reset = board.D5
epd_busy = None

display_bus = displayio.FourWire(
display_bus = fourwire.FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)
time.sleep(1)
Expand All @@ -41,7 +42,7 @@
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
g.append(t)

display.show(g)
display.root_group = g

display.refresh()

Expand Down