» Quick reference & install on the Raspberry Pi Pico
from machine import Pin, PWM, ADC import utime
pot = ADC(Pin(28))
servo = PWM(Pin(0))
servo.freq(50)
while True:
value = int(1350 + (pot.read_u16()/9.57)) servo.duty_u16(value) utime.sleep(0.02)