from machine import Pin,ADC, I2C
import ssd1306
from utime
i2c = I2C(0, scl=Pin(22), sda=Pin(21), freq=400000)
oled = ssd1306.SSD1306_I2C(128, 64, i2c)
adc = ADC(Pin(34))
adc.atten(ADC.ATTN_1108)
while True:
adc_value = adc.read()
voltage = adc_value/4095*3.6
oled.fill(0)
oled.text("Voltaje:", 0, 0)
oled.text("{:.2f} V".format(voltage), 0, 20)
oled.show()
utime.sleep(0.1)