#135AdvancedPremium

ESP32 Deep Sleep — Battery Saving (OLED + RTC RAM Counter)

The ESP32's Deep Sleep mode reduces current consumption to ~10 µA by shutting down the CPU and most peripherals, making it critical for battery-powered IoT devices. In this project, we use three different wake-up sources: a timer (15 seconds), an external pin (EXT0 — button GPIO 33), and touch (T0/GPIO 4). Variables marked with `RTC_DATA_ATTR` are preserved during deep sleep—the boot counter, timer wake counter, and button wake counter are continuously tracked. On each wake-up, the SSD1306 OLED

4.3(10)
16 completed
ESP32 Deep Sleep — Battery Saving (OLED + RTC RAM Counter)

Source Code

Premium Content

Become Premium to view the source code

Unlock Everything with Premium

All project code, FAQ sections, and troubleshooting guides for Premium members. Buy in the mobile app.

FAQ

Premium Content

Become Premium to see FAQs

Unlock Everything with Premium

All project code, FAQ sections, and troubleshooting guides for Premium members. Buy in the mobile app.

ESP32 Deep Sleep — Battery Saving (OLED + RTC RAM Counter) | BlueGrays