 String SSID = "";
 String PASS = "";
 
-int SERVER_PORT = 5000;
-String SERVER_ADDRESS = "192.168.23.104";
+int SERVER_PORT = 80;
+String SERVER_ADDRESS = "10.70.3.81";
+String SERVER_HOSTNAME = "salalivre.cloud.globoi.com";
 String healthcheckAction = "GET /healthcheck/" + ID;
 String eventAction = "POST /room/" + ID + "/event";
 

    delay(1000);
    wifi.println("AT+CIPCLOSE");
    Serial.println("ok");
    wifi.flush();
}

boolean connectWiFi() {
    Serial.print("Connecting... ");
    wifi.begin(9600);

    wifi.println("AT");
    delay(500);
    if (!wifi.find("OK")) {
        Serial.println("error connecting module");
        return false;
    }

    wifi.println("AT+RST");
    wifi.println("AT+CWMODE=1");
    delay(1000); //delay after mode change
    wifi.println("AT+CWJAP_CUR=\"" + SSID + "\",\"" + PASS + "\"");
    delay(1000);
    if (!wifi.find("OK")) {
        Serial.println("error connecting AP");

Task wifiTask(30000, sendStatus);
Task sensorTask(1200, detectPresence);
Task blinkTask(500, pblink);


void setup() {
    pinMode(sensor, INPUT);
