User Manual

This works with any analog pin or input. Use the
<pin_name>
.value to read the raw value and utilise it in your code.
import time
import board
from analogio import AnalogIn
analog_in = AnalogIn(board.A1)
while True:
print(analog_in.value)
time.sleep(0.1)
© Adafruit Industries https://learn.adafruit.com/adafruit-metro-m4-express-featuring-atsamd51 Page 117 of 172