• I see console.log("doing stuff"); in your code, but no serial port connected on the picture. Do you have data waiting at the serial port?

  • Sun 2020.02.23

    Good catch @maze1980.

    L10 console.log("Going to sleep again");

    It's very likely L7 is processed but not line 10, as the watch would trigger on the rising edge as the button is released. Two seconds elapse, the L10 log message is cued and Espruino immediately executes and enters Deep Sleep long before the (same for L16) log message is processed.

    EDIT: then again maybe not - Note from Power Consumption
    Bullet 3 'Not have any data waiting to be sent down Serial or USB'
    Note: Espruino won't enter deep sleep as soon as you execute setDeepSleep(1). It'll wait until all the bullet points above are satisfied, and then it'll enter it.

About

Avatar for Robin @Robin started