Hi all,
has anyone played around with sleeping on ESP32? Especially with the Thing Plus. I was wondering if I was doing something wrong as Sparkfun keeps saying this board is perfect for battery powered projects yet I put it to sleep with no peripherals, nothing connected except a pin that is connected to a pullup to VCC (and I tried increasing its value from 10K to 70K and it was still around 7.4mA so it is not the pullup). I pull this pin to ground to wake it and then I use the builtin led to signal when it wakes up, that's all, all the other GPIOs are unused.
here is my program:
#include <Arduino.h>
#define LED_GPIO (GPIO_NUM_13)
#define TACT_GPIO (GPIO_NUM_27)
void setup()
{
Serial.begin(9600);
Serial.println("hello going to sleep");
pinMode(LED_GPIO, OUTPUT);
pinMode(27, INPUT);
digitalWrite(LED_GPIO, HIGH);
delay(3000);
digitalWrite(LED_GPIO, LOW);
pinMode(LED_GPIO, INPUT);
Serial.println("now");
esp_sleep_enable_ext0_wakeup(TACT_GPIO, 0); // 0 = Wake up on Low
esp_deep_sleep_start();
}
void loop()
{
}
So as simple as it is, I am starting to suspect the board itself... I will look at the schematics but I would be really amazed at its price that they built it so that it leaks over 7mA... There must be something wrong in my source file!
Thanks a lot!