Skip to content

Commit bb6d999

Browse files
authored
harmonizing with other example scripts
SPI variables are now inlined.
1 parent 9516917 commit bb6d999

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

examples/tlc5947_chain.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,14 @@
88

99
import adafruit_tlc5947
1010

11-
# Define pins connected to the TLC5947
12-
SCK = board.SCK
13-
MOSI = board.MOSI
14-
LATCH = digitalio.DigitalInOut(board.D5)
15-
1611
# Initialize SPI bus.
17-
spi = busio.SPI(clock=SCK, MOSI=MOSI)
12+
spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI)
1813

1914
# Initialize TLC5947
2015
DRIVER_COUNT = 2 # change this to the number of drivers you have chained
16+
LATCH = digitalio.DigitalInOut(board.D5)
2117
tlc5947 = adafruit_tlc5947.TLC5947(spi, LATCH, num_drivers=DRIVER_COUNT)
18+
2219
# You can optionally disable auto_write which allows you to control when
2320
# channel state is written to the chip. Normally auto_write is true and
2421
# will automatically write out changes as soon as they happen to a channel, but

0 commit comments

Comments
 (0)