#include #include #include "arduino_secrets.h" const int sensorPin = 36; int sensorValue = 0; //Your Domain name with URL path or IP address with path String serverName = "http://192.168.0.43/set?seq=allon&delay=976&reverse=0&colors=ffffff&toggle=True"; void setup() { Serial.begin(115200); WiFi.begin(ssid, password); Serial.println("Connecting"); while(WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.print("Connected to WiFi network with IP Address: "); Serial.println(WiFi.localIP()); } void loop() { sensorValue = analogRead(sensorPin); if (sensorValue > 3000) { //Check WiFi connection status if(WiFi.status()== WL_CONNECTED){ HTTPClient http; String serverPath = serverName; // Your Domain name with URL path or IP address with path http.begin(serverPath.c_str()); // Send HTTP GET request int httpResponseCode = http.GET(); if (httpResponseCode>0) { Serial.print("HTTP Response code: "); Serial.println(httpResponseCode); String payload = http.getString(); Serial.println(payload); } else { Serial.print("Error code: "); Serial.println(httpResponseCode); } // Free resources http.end(); } else { Serial.println("WiFi Disconnected"); } delay (5000); } }