File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 8
8
9
9
import adafruit_tlc5947
10
10
11
- # Define pins connected to the TLC5947
12
- SCK = board .SCK
13
- MOSI = board .MOSI
14
- LATCH = digitalio .DigitalInOut (board .D5 )
15
-
16
11
# Initialize SPI bus.
17
- spi = busio .SPI (clock = SCK , MOSI = MOSI )
12
+ spi = busio .SPI (clock = board . SCK , MOSI = board . MOSI )
18
13
19
14
# Initialize TLC5947
20
15
DRIVER_COUNT = 2 # change this to the number of drivers you have chained
16
+ LATCH = digitalio .DigitalInOut (board .D5 )
21
17
tlc5947 = adafruit_tlc5947 .TLC5947 (spi , LATCH , num_drivers = DRIVER_COUNT )
18
+
22
19
# You can optionally disable auto_write which allows you to control when
23
20
# channel state is written to the chip. Normally auto_write is true and
24
21
# will automatically write out changes as soon as they happen to a channel, but
You can’t perform that action at this time.
0 commit comments