Wakeup From Sleep With a Timer (ESP32 + Arduino series)

Поділитися
Вставка
  • Опубліковано 31 тра 2024
  • You can't let the ESP32 be in deep sleep forever. At some point you need to wake it up and the easiest way is by using a timer.
    Learn how to configure your board so it will automatically wakeup after a certain periode of time. For instance: you can sleep for 15 minutes, wakeup, make a temperature measurement and go back to deep sleep.
    ⚡️Other videos in this series:
    • ESP32 + Arduino
    (Everything you need to know about programming the ESP32 by using the Arduino Framework)
    🌍 Social
    Twitter: / savjee
    Facebook: / savjee
    Blog: savjee.be
    Become a Simply Explained member: / @simplyexplained
  • Наука та технологія

КОМЕНТАРІ • 20

  • @demiurgiac
    @demiurgiac 3 години тому

    Never used "sleep" before. A little intimidated. You just saved me a lot of fooling around. Didn't realize how simple it would be. Thank you!. Also, like your style. No long intro with graphics, no personal story, no music...

  • @bgable7707
    @bgable7707 27 днів тому

    @3 mins, Great job explaining what code will run and what code will NEVER run, ie, void loop doesn't need to have code for the program to work correctly.

  • @thomasleftwite
    @thomasleftwite 10 місяців тому

    The video helps me much, thank you!

  • @Chamuga9563
    @Chamuga9563 11 місяців тому

    Very nice video! you helped me alot

  • @BlueyMcPhluey
    @BlueyMcPhluey 2 роки тому

    wow this is so much easier than I thought it would be, and funnily enough the project I'm working on is to take temperature data and send it to a cloud server 😅

  • @bubi146
    @bubi146 3 роки тому +2

    Hi
    It's a very nice instructional video you have made, and it takes place quietly, so everyone can follow - nicely made! I have a sketch that shows the time (clock), with an update every minute. It appears on the E-Paper display and it is ESP32 board that controls it. It is powered by a battery. I want to hear if you could make a small modification, so that it is not updated 24 hours a day, but only at certain time of the day, to save battery. It could e.g. Go in Deep sleep at 2300 and then wake up again at 0700, thereby saving power on the night, when I am not looking at the clock. Is it possible?
    Yours sincerely
    Georg

  • @duff8402
    @duff8402 3 роки тому

    Any thoughts why one would get "esp_deep_sleep.h no such file or directory" error? I'm running IDE on a Raspberry Pi with all libraries updaed, but I cant seem to kick this error or find any fixes on google

  • @worldexplorerPL
    @worldexplorerPL 2 роки тому

    Hello, thanks for a very thorough tutorial. However, I have a question for the DEEP SLEEP state. If I have any digital outputs and one of them is set to HIGH when entering deep sleep, how does this output react after sleep? Are the outputs still latched or are they all LOW?

    • @juncusbufonius
      @juncusbufonius Рік тому

      They would return to their startup state but you've probably worked this out with a print statement telling you their state. I believe he says you can store persistent variables and that would be the way to reinitialise them to their pre sleep state in setup.

  • @mrbumcraic5046
    @mrbumcraic5046 2 роки тому

    running from usb power, I have a sim 7600 connected to the 5v on the ESP32. The power to SIM7600 dies not turn off when in deep sleep resulting i major power drain.
    Can this be overcome

  • @ianmather7109
    @ianmather7109 2 роки тому

    Hi
    I followed your video to the letter but when the sleep code is in my Arduino IOT code the esp32 will not go online, I take the deep sleep code out and it does. I tried deep sleep code with my ESP12E and that did the same. Thoughts anyone

  • @EasyOne
    @EasyOne 4 місяці тому

    Can I add deep sleep a Timer to esp32 Internet Clock oled ?

  • @gutny
    @gutny 11 місяців тому

    This mode has ULP still working?

  • @igorbisori5117
    @igorbisori5117 3 роки тому

    I would like to put my esp32 into deep sleep with a timer. Currently esp 32 exposes an api which is called every 20 minutes. I would like to put him to sleep for 19 minutes, allow the bee to respond and then put him back to sleep. I've seen your example but it doesn't use the loop method. In my loop method there is the server.handleClient () statement; and with the sleep timer it is never called. how can i solve? Thanks to those who will answer

    • @mrbumcraic5046
      @mrbumcraic5046 2 роки тому +1

      put all of your code in setup (still keep the loop function , just leave it empty)

  • @Dralsoft
    @Dralsoft 2 роки тому +1

    I'm doing this, setting the variable to 60minutes but it wakeups instantly. The maximum seems to be 35 minutes. Any ideas?

    • @mrbumcraic5046
      @mrbumcraic5046 2 роки тому +1

      use esp_sleep_enable_timer_wakeup(8ULL*60*60*1000*1000); for example if you want 8 hours

    • @claytonnlambert
      @claytonnlambert Рік тому

      Did you sort this out? It seems no matter what value I set it instantly restarts.

    • @claytonnlambert
      @claytonnlambert Рік тому

      Fixed by delaying a bit between enabling deep sleep and starting deep sleep. Not sure why, but I must be doing something wrong.

  • @tritile
    @tritile 2 роки тому +2

    2:36 that was sad :/