from time import localtime, time
from rede import Rede
from ntptime import settime
from umqtt.simple import MQTTClient


print ('Antes de conectar à rede')
print (f'Data/Hora: {time()}')
ts = localtime()
print (f'Data/Hora(estruturada): {ts}')

print ('\n\nConectando a rede\n\n')
r = Rede ('Wokwi-GUEST','')
r.conectar(tentativas=20)