from machine import Pin, ADC
# Initialize the ADC (Analog to Digital Converter)
adc = ADC(Pin(15))
while True:
# Use ADC1 channel 6 on ESP32
adc_value = adc.read()
print(adc_value)
from machine import Pin, ADC
# Initialize the ADC (Analog to Digital Converter)
adc = ADC(Pin(15))
while True:
# Use ADC1 channel 6 on ESP32
adc_value = adc.read()
print(adc_value)