You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 17, 2019. It is now read-only.
Hi, I program the nodeMCU as my websocketclient, and send humidity and temperature data to the websocket server, for the first 5 times, the program update the data to the server successfully, but for the 6th time to send data, seemly the program is dead, this is no other information printed on the serial terminal. I have no idea what had happened. I am sure the server is OK, and the following is the information of the sketch.
Sketch uses 235,746 bytes (22%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 32,624 bytes (39%) of dynamic memory, leaving 49,296 bytes for local variables. Maximum is 81,920 bytes.
voidloop() {
h=h+1 ; //just for testt=t+0.5; //just for testif (client.connected())
{
StringpostStr="{";
postStr+="\"action\":\"update\",";
postStr+="\"apikey\":\"";
postStr+=apikey;
postStr+="\",";
postStr+="\"deviceid\":\"";
postStr+=deviceID;
postStr+="\",";
postStr+="\"params\":";
postStr+="{";
postStr+="\"humidity\":\"";
postStr+=String(h);
postStr+="\",";
postStr+="\"temperature\":\"";
postStr+=String(t);
postStr+="\"";
postStr+="}";
postStr+="}";
webSocketClient.sendData(postStr);
Serial.println("Update data");
Serial.print("humidity: ");
Serial.println(h);
} else {
Serial.println("Client disconnected.");
while (1) {
// Hang on disconnected
}
}
// wait to fully let the client disconnectdelay(20000);
}
The text was updated successfully, but these errors were encountered:
Hi, I program the nodeMCU as my websocketclient, and send humidity and temperature data to the websocket server, for the first 5 times, the program update the data to the server successfully, but for the 6th time to send data, seemly the program is dead, this is no other information printed on the serial terminal. I have no idea what had happened. I am sure the server is OK, and the following is the information of the sketch.
The text was updated successfully, but these errors were encountered: