Skip to content

Commit

Permalink
Merge pull request #22 from prcutler/root-group-fix
Browse files Browse the repository at this point in the history
Update with fourwire and root_group for CP 9 compatibility
  • Loading branch information
dhalbert authored Nov 3, 2023
2 parents 5b9337f + a9d1d6e commit 182ced7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Usage Example
import time
import board
import displayio
import fourwire
import adafruit_ssd1680
displayio.release_displays()
Expand All @@ -86,7 +87,7 @@ Usage Example
epd_reset = board.D8 # Set to None for FeatherWing
epd_busy = board.D7 # Set to None for FeatherWing
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 Down Expand Up @@ -115,7 +116,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/ssd1680_2.13_featherwing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import time
import board
import displayio
import fourwire
import adafruit_ssd1680

displayio.release_displays()
Expand All @@ -26,7 +27,7 @@
epd_cs = board.D9
epd_dc = board.D10

display_bus = displayio.FourWire(
display_bus = fourwire.FourWire(
spi, command=epd_dc, chip_select=epd_cs, baudrate=1000000
)
time.sleep(1)
Expand All @@ -48,7 +49,7 @@

g.append(t)

display.show(g)
display.root_group = g

display.refresh()

Expand Down
5 changes: 3 additions & 2 deletions examples/ssd1680_2.13_mono_eink_bonnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import time
import board
import displayio
import fourwire
import adafruit_ssd1680

displayio.release_displays()
Expand All @@ -29,7 +30,7 @@
epd_reset = board.D27 # Set to None for FeatherWing
epd_busy = board.D17 # Set to None for FeatherWing

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 @@ -52,7 +53,7 @@
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/ssd1680_2.13_tricolor_breakout.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_ssd1680

displayio.release_displays()
Expand All @@ -25,7 +26,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, baudrate=1000000
)
time.sleep(1)
Expand All @@ -47,7 +48,7 @@

g.append(t)

display.show(g)
display.root_group = g

display.refresh()

Expand Down
5 changes: 3 additions & 2 deletions examples/ssd1680_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_ssd1680

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_ssd1680.SSD1680(
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/ssd1680_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import time
import board
import displayio
import fourwire
import adafruit_ssd1680

displayio.release_displays()
Expand All @@ -29,7 +30,7 @@
epd_reset = board.D8 # Set to None for FeatherWing
epd_busy = board.D7 # Set to None for FeatherWing

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 @@ -52,7 +53,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 182ced7

Please sign in to comment.