Quantcast
Viewing all articles
Browse latest Browse all 4886

General • Re: Help with Pico ADC project

Have just confirmed that the following code works just fine for the ADC.

Code:

from machine import Pin, ADCimport timeadc = ADC(Pin(26, mode=Pin.IN))while True:    val = adc.read_u16()    val = val * (3.3 / 65535)    print(round(val, 2), "V") # Keep only 2 digits    time.sleep_ms(100)

Statistics: Posted by deanfourie1 — Fri Jun 21, 2024 2:27 am



Viewing all articles
Browse latest Browse all 4886

Trending Articles