code.py
1 # SPDX-FileCopyrightText: 2018 Anne Barela for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 import time 6 import board 7 from analogio import AnalogIn 8 9 potentiometer = AnalogIn(board.A1) # potentiometer connected to A1, power & ground 10 11 while True: 12 13 print((potentiometer.value,)) # Display value 14 15 time.sleep(0.25) # Wait a bit before checking all again