from machine import Pin,PWM

MAX=8000
MIN=1500

servo=PWM(Pin(10))
servo.freq(50)
range=MAX-MIN
step=(range/180)

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