u2if/examples/read_analog.py
2021-03-20 20:34:33 +01:00

8 lines
154 B
Python

import time
from machine import u2if, ADC
analog = ADC(u2if.GP26_ADC0)
while True:
print('Analog GP26_ADC0: %d' % analog.value())
time.sleep(1)