print("Hello, ESP32!")
from machine import Pin
from machine import ADC
import time
pot_pin = ADC(Pin(36))
while True:
#read the state of the push button
pot_value = pot_pin.read()
print(pot_value)
time.sleep(0.1)
# convert to voltage
pot_voltage = pot_value * (5/4095)
print(pot_voltage)
time.sleep(0.1)