from machine import Pin, ADC
import time
from servo import Servo
pot = ADC(Pin(28))
conversion_factor = 180/65535
a = Pin(14, Pin.IN)
b = Pin(15, Pin.IN)
servo = Servo(pin_id=16)
pos = 0
delay = 25
while True:
pot_voltage = pot.read_u16() * conversion_factor
print(pot_voltage)
servo.write(pot_voltage)
time.sleep(0.1)