You are reading a single comment by @Stevie and its replies. Click here to read the full conversation.
  • Hi,

    I have a problem with the setDeepSleep. My understanding is that it should work on the Espruino Pico. Is this correct?

    It does lead to weird effects for me. Basically I am using the following snippet from the power tutorial (with different constants):

    setInterval(function() {
        digitalWrite(LED1, 1);
        setTimeout(function () {
            digitalWrite(LED1, 0);
        }, 5000);
    }, 10000);
    setDeepSleep(1);
    

    The code works fine when connected to USB (my understanding is that deep sleep is disabled in that case anyway). It does not work when connected to a battery. Instead of blinking for 5 seconds every 10 seconds, it blinks every 10 seconds for like 3 ms (measured by monitoring the current consumption with an oscilloscope).

    If I remove the setDeepSleep, then it works fine even with a battery - albeit with a lot higher power consumption, of course. I monitor the battery voltage and stays constant at about 4 V (Li-Ion).

    Am I doing something wrong?

    Thanks!

About

Avatar for Stevie @Stevie started