from machine import reset, Pin
from rede import Rede
from time import sleep_ms
from json import load
from ntptime import settime
from processo import Volume
with open('config.json', 'r') as arq:
cfg = load(arq)
def cbTimer(t):
global taNaHora
taNaHora = True
def debug(arg):
print(arg)
with open('config.json') as arq:
cfg = load(arq)
r = Rede(cfg['rede'], cfg['senha'], cb=debug)
if r.conectado:
settime()
else:
print ('Deu ruim...Reiniciando')
sleep_ms(2000)
reset()
# Cria e inicializa a simulação
processo = Volume()
while True:
processo.update()
Loading
aitewinrobot-esp32c3-supermini
aitewinrobot-esp32c3-supermini