from machine import ADC
import time
time.sleep(0.1) # Wait for USB to become ready
LowMAX = 21845
MidMax = 43690
potentiometer = ADC(28)
while True:
result = potentiometer.read_u16()
if result < LowMAX:
print("Low")
elif result < MidMax:
print("Medium")
else:
print("High")
time.sleep(0.3)