Skip to content

Commit

Permalink
Merge pull request #13 from prcutler/root-group-fix
Browse files Browse the repository at this point in the history
Update to use fourwire and root_group for CP 9 compatibility
  • Loading branch information
dhalbert authored Nov 3, 2023
2 parents 57ba9f9 + 7a68a58 commit a94e14e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Usage Example
import time
import board
import displayio
import fourwire
import adafruit_ssd1681
displayio.release_displays()
Expand All @@ -81,7 +82,7 @@ Usage Example
epd_reset = board.D5
epd_busy = board.D6
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 @@ -105,7 +106,7 @@ Usage Example
g.append(t)
display.show(g)
display.root_group = g
display.refresh()
print("refreshed")
Expand Down
5 changes: 3 additions & 2 deletions examples/ssd1681_four_corners.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import board
import busio
import displayio
import fourwire
import terminalio
import adafruit_ssd1681

Expand All @@ -27,7 +28,7 @@
epd_reset = board.EPD_RESET
epd_busy = board.EPD_BUSY

display_bus = displayio.FourWire(
display_bus = fourwire.FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)
display = adafruit_ssd1681.SSD1681(
Expand All @@ -42,7 +43,7 @@

# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

palette = displayio.Palette(2)
palette[0] = 0x000000
Expand Down
5 changes: 3 additions & 2 deletions examples/ssd1681_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import time
import board
import displayio
import fourwire
import adafruit_ssd1681

displayio.release_displays()
Expand All @@ -23,7 +24,7 @@
epd_reset = board.D5
epd_busy = board.D6

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 @@ -49,7 +50,7 @@
# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
g.append(t)

display.show(g)
display.root_group = g

display.refresh()

Expand Down

0 comments on commit a94e14e

Please sign in to comment.