Xinyuan-LilyGO / LilyGO-T-A76XX

LilyGo A7670X A7608X SIM7670G series
MIT License
128 stars 57 forks source link

Device waken up from deep sleep after random time #28

Closed mp-mba closed 1 year ago

mp-mba commented 1 year ago

Hi,

I'm testing the device as a controller for door sensor. I would like to wake up the device from the deep sleep using esp_sleep_enable_ext0_wakeup. But my problem is the the device is waken up immediately after going to sleep, without any state change on my pin. I was eliminating line by line from examples/new_version/platformio/src/main.cpp code and I've tracked the piece of code that is causing this behaviour:

    pinMode(PWR_PIN, OUTPUT);
    digitalWrite(PWR_PIN, LOW);
    delay(100);
    digitalWrite(PWR_PIN, HIGH);
    delay(1000);
    digitalWrite(PWR_PIN, LOW);

Can you explain to me what is the purpose of those lines of code? Is hard to me to understand it. Sorry for that, I'm still learning. Thanks in advance.

LilyGO commented 1 year ago

Hello. This code starts A7670