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)
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)