Machine.reset_cause()



  • Hi.

    Is it possible to determine whether the on-board reset button was pressed vs. the LoPy turning back on again after a power outage?
    I've tried using the machine.reset_cause(), but it looks like both of my scenarios will go under machine.PWRON_RESET?

    Thanks.



  • @asb No, because the reset pin, connected to CHIP_PU on the ESP32, actually switches the power. That is in the data sheet:

    CHIP_PU
    High: On; enables the chip
    Low: Off; the chip powers off


Log in to reply
 

Pycom on Twitter