• Trying to use the watchdog timer, I run the code straight from the example in the Firmware API Reference;

    from machine import WDT
    wdt = WDT(timeout=2000) # enable it with a timeout of 2s

    and I get;

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: cannot import name WDT

    I'm running 1.6.12.b1

    (sysname='LoPy', nodename='LoPy', release='1.6.12.b1', version='v1.8.6-593-g8e4ed0fa on 2017-04-12', machine='LoPy with ESP32', lorawan='1.0.0')

    Any help would be appreciated.

  • @jmarcelino thanks for your response, hopefully they will implement the WDT in the LoPy soon. I might try and do something with the internal interrupts in the meantime.

  • I don't think the LoPy has a WDT module, at least not yet. That part of the documentation seems to have been copied over from the older v1 boards (by mistake?)

    The documentation says "Availability of this class: pyboard, WiPy."

Log in to reply

Pycom on Twitter