Hi
Is there anyone in here there is able to help me out with this little code problem.
In my code I'm sending this get request:
WiFiClient client;
HTTPClient http;
http.begin(client, "http://"SERVER_IP"/do_value/slot_0/ch_0");
http.addHeader("Authorization", "Basic cm9vdDowMDAwMDAwMA==");
//http.addHeader("Content-Type", "application/json");
Serial.println("[HTTP] GET...\n");
Serial.println("2......");
// start connection and send HTTP header and body
int httpCode = http.GET();
String response = http.getString();
Serial.print("StatusCode: ");
Serial.println(httpCode);
Serial.print("Response: ");
Serial.println(response);
if (response == {"Ch":0,"Md":0,"Val":1,"Stat":0,"PsCtn":0,"PsStop":0,"PsIV":0})
{
digitalWrite(module,HIGH);
}
I want to set module HIGH if the val=1
I hope someone is able to help me out.
Best regards Term