ESP-01 Deep Sleep

9 years 4 months ago #1824 by zyrotron
ESP-01 Deep Sleep was created by zyrotron
Is it possible to put ESP-01 in deep sleep mode? Could someone give an example code?

Please Log in or Create an account to join the conversation.

9 years 4 months ago - 9 years 4 months ago #1828 by cwalger
Replied by cwalger on topic ESP-01 Deep Sleep
At the top of the sketch, put:
extern "C" {
#include "user_interface.h" //for sleep
}

then, to sleep:
system_deep_sleep_set_option(0);
system_deep_sleep(60000000); //in us, 1 min

You need to solder a tiny piece of wire between a corner pin on the ESP chip and the reset pin on the header, to allow it to wake itself up. See a pic here: http://tim.jagenberg.info/files/2015/01/PTIM9823.png

When the ESP wakes up, it begins the code over again, as if it were just powered on. The code does not continue where it left off.

Also remove the constant-on LED, which uses decent current. It is circled in linked pic.

Please Log in or Create an account to join the conversation.

Time to create page: 0.205 seconds

Forum latest

  • No posts to display.