text: # type: ignore
  # FIXME: The functions defined in the asm_pio decorator are not recognized by pyright.
  # ignore for now : other issues to solve first
  """
  Sample from micropython documentaton
  
  # programmable IO
  # ref : https://docs.micropython.org/en/latest/rp2/quickref.html#programmable-io-pio
  """
  
  from machine import Pin
  import rp2
  
  
  @rp2.asm_pio(set_init=rp2.PIO.OUT_LOW)
  def blink_1hz():
      # Cycles: 1 + 7 + 32 * (30 + 1) = 1000
      set(pins, 1)
      set(x, 31)[6]
      label("delay_high")
      nop()[29]
      jmp(x_dec, "delay_high")
  
      # Cycles: 1 + 7 + 32 * (30 + 1) = 1000
      set(pins, 0)
      set(x, 31)[6]
      label("delay_low")
      nop()[29]
      jmp(x_dec, "delay_low")
  
  
  # Create and start a StateMachine with blink_1hz, outputting on Pin(25)
  sm = rp2.StateMachine(0, blink_1hz, freq=2000, set_base=Pin(25))
  sm.active(1)
  