import time
from machine import Pin, ADC, PWM
# import picozero #given in sir's assignment sheet
verticle = ADC(26)
horizontal = ADC(27)
select = Pin(0,Pin.IN)
motor = PWM(Pin(1))
motor.freq(50)
while True:
for position in range(1000,9000,50):
motor.duty_u16(position)
print(position)
time.sleep(0.01)
for position in range(9000,1000,-50):
motor.duty_u16(position)
print(position)
time.sleep(0.01)