Skip to content

ESP8266 doesnt wake up after put to deepsleep. #4071

@grek22

Description

@grek22

Hardware: wemos d1 r1
SDK: v2.1.0-10-g509eae8

.ino:

#include <OneWire.h>
#include <DallasTemperature.h>
#include <ESP8266WiFi.h>

const char *ssid = "";
const char *password = "";
WiFiClient *client = new WiFiClient();
IPAddress clientIP = IPAddress(9xxx);

OneWire oneWire(5);
DallasTemperature sensors(&oneWire);
float temp1;
unsigned czas;
void work();

void setup(void) {
Serial.begin(115200);
while (!Serial)
delay(10);
czas = millis();
WiFi.config(IPAddress(192, 168, 8, 110), IPAddress(192, 168, 8, 1),IPAddress(255,255,255,0));
WiFi.begin(ssid, password);
sensors.setResolution(9);
sensors.begin();
while (WiFi.status() != WL_CONNECTED) {
if((millis()-czas)>10000)
ESP.deepSleep(60e6, WAKE_RF_DEFAULT);
delay(100);
}
work();
}

void loop(void) {
delay(10);
}

void work() {
do {
sensors.requestTemperatures();
temperatura1 = sensors.getTempCByIndex(0);
} while (temperatura1 == 85 || temperatura1 == -127);
sensors.requestTemperatures();
delay(500);
temp1 = sensors.getTempCByIndex(0);
String url = "example";
client->connect(clientIP, 80);
client->println(url)
client->flush();
client->stop();
delete client;
ESP.deepSleep(10e6, WAKE_RF_DEFAULT);
}

Problem:
After a random time ESP doesnt wake up. [zombie mode on GPIO-0]

Conection:
RST-> GPIO16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions