import uos, machine import esp import gc import webrepl import micropython import network import mqtt from machine import Timer tim = Timer(-1) n=0 esp.osdebug(None) gc.collect() staif = network.WLAN(network.STA_IF); staif.active(True) staif.isconnected() #staif.connect("free5G", "geheimpw") staif.connect("FRITZ!Box 7490", "") while staif.isconnected() == False: pass webrepl.start() def task1(count=n): print(count) mqtt.main() p0 = machine.Pin(0, machine.Pin.OUT) # create outpmachine.Pin(15 p0.on() tim.init(period=8000, mode=Timer.PERIODIC, callback=lambda t:task1(n))