Skip to content

Commit e4abdcd

Browse files
committed
Update examples to more expected pinout
1 parent 3e49400 commit e4abdcd

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

examples/max7219_custommatrixtest.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
# SPDX-License-Identifier: MIT
33

44
import time
5-
from board import TX, RX, A1
5+
import board
66
import busio
77
import digitalio
88
from adafruit_max7219 import matrices
99

10-
mosi = TX
11-
clk = RX
12-
cs = digitalio.DigitalInOut(A1)
10+
# You may need to change the chip select board depending on your wiring
11+
mosi = board.MOSI
12+
clk = board.CLK
13+
cs = digitalio.DigitalInOut(board.D4)
1314

1415
spi = busio.SPI(clk, MOSI=mosi)
1516

examples/max7219_showbcddigits.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
import time
55
import random
6-
from board import TX, RX, A1
6+
import board
77
import busio
88
import digitalio
99
from adafruit_max7219 import bcddigits
1010

11-
mosi = TX
12-
clk = RX
13-
cs = digitalio.DigitalInOut(A1)
11+
# You may need to change the chip select board depending on your wiring
12+
mosi = board.MOSI
13+
clk = board.CLK
14+
cs = digitalio.DigitalInOut(board.D4)
1415

1516
spi = busio.SPI(clk, MOSI=mosi)
1617

examples/max7219_simpletest.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
# SPDX-License-Identifier: MIT
33

44
import time
5-
from board import TX, RX, A1
5+
import board
66
import busio
77
import digitalio
88
from adafruit_max7219 import matrices
99

10-
mosi = TX
11-
clk = RX
12-
cs = digitalio.DigitalInOut(A1)
10+
# You may need to change the chip select board depending on your wiring
11+
mosi = board.MOSI
12+
clk = board.CLK
13+
cs = digitalio.DigitalInOut(board.D4)
1314

1415
spi = busio.SPI(clk, MOSI=mosi)
1516

0 commit comments

Comments
 (0)