import machine
import time
pins = [
machine.Pin(12, machine.Pin.OUT), # 1
machine.Pin(13, machine.Pin.OUT), # 2
machine.Pin(14, machine.Pin.OUT), # 4
machine.Pin(15, machine.Pin.OUT), # 8
]
phases = [ 1, 5, 4, 6, 2, 10, 8, 9 ]
while True:
for phase in phases:
for n, p in enumerate(pins):
pins[n](phase & 1<<n)
time.sleep(0.001)