##############################################
# IMPORT LIBRARIES
##############################################
from machine import Pin, ADC
from utime import sleep
##############################################
# PIN CONFIGURATIONS
##############################################
# Configure the analog pin as input
# Replace 'x' with the appropriate ADC pin number
pot_pin = ADC(Pin(0))
##############################################
# MAIN ROUTINE
##############################################
def main():
while True:
# Read the potentiometer value
pot_value = pot_pin.read()
# Print the potentiometer value
print(pot_value)
# Delay for readability
sleep(0.1)
##############################################
# EXECUTE MAIN ROUTINE
##############################################
if __name__ == "__main__":
main()