WDT not available
I try to use the WDT starting with
from machine import WDT
but I get the following:
Running main.py Traceback (most recent call last): File "<stdin>", line 9, in <module> ImportError: cannot import name WDT
I think my WiPy is up to date:
(sysname='WiPy', nodename='WiPy', release='1.6.12.b1', version='v1.8.6-593-g8e4ed0fa on 2017-04-12', machine='WiPy with ESP32')
According to the log the WDT module only became available this past Friday in version 1.7.2.
I updated my WiPy 2.0 late last week and there still does not seem to be a WDT available.
My workaround was to put all the code in a 'Try/Except' and have a machine.reset() in the 'Except'.
FYI I plan to work around this issue by using one of the two alarms on a DS3231 RTC. It has an alarm with a resolution of one second; So to keep the system from staying locked up I'll constantly reset the alarm to 10 (or some number) seconds in the future. If the alarm ever fires it'll hit the WiPy reset.
Does this mean there is no watchdog running in the background either, just not at all functional?
Then I concur with the OP and request that the docs be updated.
Yes, if WDT is not avaiable (now) it is not avaiable on all boards, Wipy2, Lopy...
Same error, and I have a WiPy 2.0. Livius I'm not clear from your answer if you're saying this is an issue also on the WiPy 2.0, yes?
Wipy1 or Wipi2
I assume that Wipi2 because you have software version
And python modules are same for all boards
with some exception like Lora, Sigfox, LTE-M specific
Then link is valid for you
But mine IS a WiPy, so it should be implemented, isn't it?
Otherwise, please correct the documentation. It's so frustrating to try out things, try to find the failure, and then get told that it's simply not implemented.