from machine import Pin, ADC
from time import sleep_ms
from neopixel import NeoPixel
botao = Pin (0, Pin.IN)
conversor = ADC(Pin(4))
np = NeoPixel(Pin(5),1)
while True:
valor = conversor.read_u16()
tensao = valor/65535*3.3
print (f'{valor}, {tensao}V')
np[0] = (255,0,0)
np.write()
sleep_ms(500)
np[0] = (0,255,0)
np.write()
sleep_ms(500)
np[0] = (0,0,255)
np.write()
sleep_ms(500)
np[0] = (255,128,0)
np.write()
sleep_ms(500)