Enable watchdog timer
This commit is contained in:
parent
8902adf18c
commit
d33bd6b0e4
12
src/main.py
12
src/main.py
|
@ -51,8 +51,8 @@ async def main():
|
||||||
# start the server in a bacakground task
|
# start the server in a bacakground task
|
||||||
print("Starting")
|
print("Starting")
|
||||||
server = asyncio.create_task(w.start_server(host="0.0.0.0", port=80))
|
server = asyncio.create_task(w.start_server(host="0.0.0.0", port=80))
|
||||||
#wdt = machine.WDT(timeout=10000)
|
wdt = machine.WDT(timeout=10000)
|
||||||
#wdt.feed()
|
wdt.feed()
|
||||||
|
|
||||||
|
|
||||||
asyncio.create_task(wifi_connect())
|
asyncio.create_task(wifi_connect())
|
||||||
|
@ -63,10 +63,10 @@ async def main():
|
||||||
|
|
||||||
#print(time.localtime())
|
#print(time.localtime())
|
||||||
|
|
||||||
# gc.collect()
|
#gc.collect()
|
||||||
for i in range(60):
|
for i in range(20):
|
||||||
#wdt.feed()
|
wdt.feed()
|
||||||
await asyncio.sleep_ms(500)
|
await asyncio.sleep_ms(1000)
|
||||||
|
|
||||||
# cleanup before ending the application
|
# cleanup before ending the application
|
||||||
await server
|
await server
|
||||||
|
|
Loading…
Reference in New Issue