from machine import Pin
import time

ds = Pin(15,Pin.OUT)
latch = Pin(2,Pin.OUT)
shift = Pin(4,Pin.OUT)

ds.value(1)
shift.off()
shift.on()

latch.off()
latch.on()
time.sleep_ms(300)

for i in range(7):
    ds.value(0)
    shift.off()
    shift.on()

    latch.off()
    latch.on()
    time.sleep_ms(300)
74HC595
74HC595