#IMPORT
from machine import Pin, ADC
from time import sleep
#CONSTANT
led_vermelho = Pin(0, Pin.OUT)
led_interno = Pin(25, Pin.OUT)
bot = Pin(19, Pin.IN, Pin.PULL_UP)
pot = ADC(28)
valor = 0
#RESPOSTAS E VARIAVEIS
while True:
if bot.value() == 0:
valor = pot.read_u16()
valor_pot_mat = float(valor - 0094)
led_interno.off()
led_vermelho.off()
if valor_pot_mat < 3500:
led_vermelho.toggle()
print("O VALOR POT MAT ESTA PERIGOSO:\t" ,valor_pot_mat)
sleep(0.5)
elif valor_pot_mat > 3500:
led_vermelho.off()
led_interno.on()
print("O VALOR ESTA SOB CONTROLE\t", valor_pot_mat)
sleep(1)
else:
led_vermelho.off()
led_interno.off()
sleep(0.5)
print(f"ACIONE O BOTAO!")