#Tipos de bibliotecas e classes:
from machine import Pin, ADC
from time import sleep
import dht
led = Pin(25, Pin.OUT)
vermelho = Pin(1, Pin.OUT)
azul = Pin(5, Pin.OUT)
botao = Pin(28, Pin.IN, Pin.PULL_DOWN)
pot = ADC(27)
x = 0
matrícula = 74
while True:
x = pot.read_u16()
led.off()
vermelho.off()
azul.off()
diferença = x-matrícula
if botao.value() == 1:
if (diferença <10000):
led.on()
print(x)
elif (diferença>10000):
print(x)
vermelho.on()
azul.on()
else:
vermelho.on()
azul.on()