Code: Select all
import machine, time
adc = machine.ADC(27)
while True:
t1 = adc.read_u16() >> 4
print (t1)
Now put a 'time.sleep_ms(10)' statement after the 'print' and re-run. Now the conversion value varies with the voltage, consistently.
I've been playing with Pico's for a couple weeks now, and have found numerous odd issues like this, although most of the others had to do with multi-threading on Pico. It's enough to drive a person to 'C' or the ESP32 !!
If anybody has idea what's going on here, love to hear your thoughts.