Enable watchdog timer

This commit is contained in:
jimmy 2025-05-28 21:17:23 +12:00
parent 8902adf18c
commit d33bd6b0e4
1 changed files with 6 additions and 6 deletions

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())
@ -63,10 +63,10 @@ async def main():
#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