• I have code that runs endless loop:
    do some work in the onInit() method, deepSleep, wake-up and over again

    it works fine, but I need to be able to stop this endless loop so that I can gain access to the terminal and reset or change code.

  • Usually Espruino doesn't load code if a button is pressed at boot, but unfortunately it looks like on the normal ESP32 build no pin has been defined for this, so I'm not really sure there's a way.

    You could always boot to the bootloader mode and then erase the first page of Storage (at 0x320000 I think?)

  • Any hints how to set-up a "button" pin?

    I ended up checking for certain pin in my code which I short or pull up when needed.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

how to set `hasBeenReset` to true in order to avoid running onInit?

Posted by Avatar for gdanov @gdanov