import rp2
from machine import Pin
@rp2.asm_pio(set_init=rp2.PIO.OUT_LOW)
def blink():
wrap_target()
set(pins, 1)
set(pins, 0)
wrap()
# Instantiate a state machine with the blink program, at 2000Hz, with set bound to Pin(0)
sm0 = rp2.StateMachine(0, blink, freq=2000, set_base=Pin(0))
# Activate the state machine 0 (external led)
sm0.active(1)