Skip to content

Commit deccffd

Browse files
authored
Merge pull request #2 from tannewt/fixup_spi
Swap to board.SPI() on a Feather
2 parents 7a07831 + cdd77e5 commit deccffd

File tree

3 files changed

+14
-19
lines changed

3 files changed

+14
-19
lines changed

README.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,24 @@ Usage Example
6868
6969
import time
7070
import board
71-
import busio
7271
import displayio
7372
import adafruit_il0398
7473
7574
displayio.release_displays()
7675
77-
# This pinout works on a Metro and may need to be altered for other boards.
78-
# For breadboarding
79-
spi = busio.SPI(board.SCL, board.SDA)
76+
# This pinout works on a Feather M4 and may need to be altered for other boards.
77+
spi = board.SPI() # Uses SCK and MOSI
8078
epd_cs = board.D9
81-
epd_dc = board.D8
82-
epd_reset = board.D7
79+
epd_dc = board.D10
80+
epd_reset = board.D5
8381
epd_busy = board.D6
8482
8583
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset,
8684
baudrate=1000000)
8785
time.sleep(1)
8886
89-
display = adafruit_il0398.IL0398(display_bus, width=400, height=300, seconds_per_frame=20, busy_pin=epd_busy)
87+
display = adafruit_il0398.IL0398(display_bus, width=400, height=300, seconds_per_frame=20,
88+
busy_pin=epd_busy)
9089
9190
g = displayio.Group()
9291

examples/il0398_4.2_color.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@
1010

1111
import time
1212
import board
13-
import busio
1413
import displayio
1514
import adafruit_il0398
1615

1716
displayio.release_displays()
1817

19-
# This pinout works on a Metro and may need to be altered for other boards.
20-
# For breadboarding
21-
spi = busio.SPI(board.SCL, board.SDA)
18+
# This pinout works on a Feather M4 and may need to be altered for other boards.
19+
spi = board.SPI() # Uses SCK and MOSI
2220
epd_cs = board.D9
23-
epd_dc = board.D8
24-
epd_reset = board.D7
21+
epd_dc = board.D10
22+
epd_reset = board.D5
2523
epd_busy = board.D6
2624

2725
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset,

examples/il0398_simpletest.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,16 @@
88

99
import time
1010
import board
11-
import busio
1211
import displayio
1312
import adafruit_il0398
1413

1514
displayio.release_displays()
1615

17-
# This pinout works on a Metro and may need to be altered for other boards.
18-
# For breadboarding
19-
spi = busio.SPI(board.SCL, board.SDA)
16+
# This pinout works on a Feather M4 and may need to be altered for other boards.
17+
spi = board.SPI() # Uses SCK and MOSI
2018
epd_cs = board.D9
21-
epd_dc = board.D8
22-
epd_reset = board.D7
19+
epd_dc = board.D10
20+
epd_reset = board.D5
2321
epd_busy = board.D6
2422

2523
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset,

0 commit comments

Comments
 (0)