Simple test
Ensure your device works with this simple test.
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4import time
5import board
6import busio
7import digitalio
8import adafruit_74hc595
9
10spi = busio.SPI(board.SCK, MOSI=board.MOSI)
11
12latch_pin = digitalio.DigitalInOut(board.D5)
13sr = adafruit_74hc595.ShiftRegister74HC595(spi, latch_pin)
14
15pin1 = sr.get_pin(1)
16
17while True:
18 pin1.value = True
19 time.sleep(1)
20 pin1.value = False
21 time.sleep(1)