from machine import Pin, ADC
from time import sleep
coluna = {
1: Pin(18, Pin.PULL_UP),
2: Pin(5, Pin.PULL_UP),
3: Pin(17, Pin.PULL_UP),
4: Pin(16, Pin.PULL_UP)
}
linha = {
1: Pin(23, Pin.PULL_UP),
2: Pin(22, Pin.PULL_UP),
3: Pin(21, Pin.PULL_UP),
4: Pin(19, Pin.PULL_UP)
}
numeros = [
("1")
]
pot = ADC(Pin(34))
pot_anterior = 0
t = 0
while True:
for i in coluna:
coluna[i].on()
if linha[b] == True:
print()
sleep(pot.read()/4095)
coluna[i].off()