SOLVED!!!!!. My arduino software was not compiling the program correctly. Thank frittna for her work and willingness towards the community. Thanks for everything.
Hello . I have a problem, as you can see in the image. Do you know how I could solve it? When it starts if it connects. but then the loop problem. Thanks.
Wifi connection Lost!
I help, please
When the program loads, it connects to the Wi-Fi correctly, but then it only makes it connect and disconnect, and the Wi-Fi connection lost message appears.
WiFiClientSecure client;
if (!client.connect(restApiHost, 443)) {
error("\n\nWiFi connection lost!");
wifi_error = true;
return false;
}
client.print("GET " + getRestApiUrl() + " HTTP/1.1\r\n" +
"Host: " + restApiHost + "\r\n" +
"Accept: application/json\r\n" +
"User-Agent: BuildFailureDetectorESP8266\r\n" +
"Connection: close\r\n\r\n");
while (client.connected()) {
M5.Lcd.fillCircle(101, topPanel + (infoPanel / 2), 4, TFT_YELLOW); //busy light yellow
String line = client.readStringUntil('\r');
line.trim();
if (line.startsWith("[") && line.endsWith("]")) {
DeserializationError err = deserializeJson(jsonDoc, line);
if (err) {
error(err.c_str());
ws_error = true;
return false;
} else if (jsonDoc.as<JsonArray>().size() == 0) {
error("Empty JSON array");
ws_error = true;
return false;
}