from machine import Pin,PWM

servo = PWM(Pin(0))

servo.freq(50)
min = 1500
max = 8000

range = (max-min)
step = int(range/180)

while 1<2:
    angle = int(input('enter a angle'))
    value = int(step*angle)+1500
    servo.duty_u16(value)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT