2 Commits

Author SHA1 Message Date
2dd20fa51b Enable garabage collection 2025-05-28 21:19:56 +12:00
d33bd6b0e4 Enable watchdog timer 2025-05-28 21:17:23 +12:00

View File

@@ -51,8 +51,8 @@ async def main():
# start the server in a bacakground task
print("Starting")
server = asyncio.create_task(w.start_server(host="0.0.0.0", port=80))
#wdt = machine.WDT(timeout=10000)
#wdt.feed()
wdt = machine.WDT(timeout=10000)
wdt.feed()
asyncio.create_task(wifi_connect())
@@ -62,11 +62,10 @@ async def main():
while True:
#print(time.localtime())
# gc.collect()
for i in range(60):
#wdt.feed()
await asyncio.sleep_ms(500)
gc.collect()
for i in range(20):
wdt.feed()
await asyncio.sleep_ms(1000)
# cleanup before ending the application
await server