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