Skip to content

Commit 3bf34cc

Browse files
committed
update example and readme
1 parent f97a077 commit 3bf34cc

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

README.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,14 @@ Usage Example
105105
import time
106106
import board
107107
import displayio
108-
import fourwire
109108
import adafruit_acep7in
110109
110+
# For 8.x.x and 9.x.x. When 8.x.x is discontinued as a stable release, change this.
111+
try:
112+
from fourwire import FourWire
113+
except ImportError:
114+
from displayio import FourWire
115+
111116
displayio.release_displays()
112117
113118
# This pinout works on a Feather RP2040 and may need to be altered for other boards.
@@ -117,7 +122,7 @@ Usage Example
117122
epd_reset = board.D11
118123
epd_busy = board.D12
119124
120-
display_bus = fourwire.FourWire(
125+
display_bus = FourWire(
121126
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
122127
)
123128

examples/acep7in_simpletest.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
1111
import time
1212
import board
1313
import displayio
14-
import fourwire
1514
import adafruit_acep7in
1615

16+
# For 8.x.x and 9.x.x. When 8.x.x is discontinued as a stable release, change this.
17+
try:
18+
from fourwire import FourWire
19+
except ImportError:
20+
from displayio import FourWire
21+
22+
1723
displayio.release_displays()
1824

1925
# This pinout works on a Feather RP2040 and may need to be altered for other boards.
@@ -23,7 +29,7 @@
2329
epd_reset = board.D11
2430
epd_busy = board.D12
2531

26-
display_bus = fourwire.FourWire(
32+
display_bus = FourWire(
2733
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
2834
)
2935

0 commit comments

Comments
 (0)