Xinyuan-LilyGO / LilyGo-EPD47

GNU General Public License v3.0
379 stars 119 forks source link

Unable to run deep sleep on battery #95

Open mirekhk opened 1 year ago

mirekhk commented 1 year ago

Hi there,

I have LILYGO T5-4.7-S3 and I am trying to use deep sleep. Everything works fine and it wakes up each 5 min when it is connected via USB to PC. When I run it from Li-Po battery it does not update data on the screen. The same situation is when the board is connected to 5V power supply to charge battery. It does not work either. It looks like it is related to PWR_EN input. It should be handled by epd_poweron() function but it does not work.

void BeginSleep() {
  epd_poweroff_all();
  epd_poweron(); 
   esp_sleep_enable_timer_wakeup(5*60 * 1000000LL); 
  esp_deep_sleep_start();  
}

Can you help me with a code example how to enable PWR_EN input programaticaly when ESP goes to deep sleep?

thank you mirek

mirekhk commented 1 year ago

Disregard the request. Everything works fine. The program was waiting for Serial port and it was never ending loop without PC:-)

Serial.begin(115200);
  //while (!Serial);

Commenting loop out fixed the issue.

Thank you all for your help mirek