from RP2040ADC import Rp2040AdcDmaAveraging
import time

PIN_IN = 28

avg_adc = Rp2040AdcDmaAveraging(gpio_pin=PIN_IN, dma_chan=0, adc_samples=16)
print("ADC + DMA test for Raspberry Pi Pico")
while True:
  avg_adc.capture_start()
  print("ADC:", avg_adc.wait_and_read_average_u12())
  time.sleep(0.1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT