STRING TO CHAR

This commit is contained in:
JonatanRek 2019-11-28 13:13:43 +01:00
parent 65439922b1
commit b2e4da37bf

View File

@ -79,10 +79,10 @@ void loop() {
DeserializationError error = deserializeJson(doc, httpPayload); //Get deserialization Error if exists
//configuration setup
String hostName = doc["device"]["hostname"];
int sleepTime = doc["device"]["sleepTime"];
String ipAddress = doc["device"]["ipAddress"];
String state = doc["state"];
char *hostName = doc["device"]["hostname"].c_str();
char *ipAddress = doc["device"]["ipAddress"].c_str();
char *state = doc["state"].c_str();
if (state != "succes") {
unsuccessfulRounds++;