       if (c == 0x0A) {
         sendResponse = true;
         commTime = millis();  
+        inactiveSpan = 0;
         client.flush(); // clear input buffer
         break;
       }

    }
  }
  
  DEBUG_WRITETIME();
  DEBUG_PRINTLN();
}

void setup() {
  Serial.begin(9600);
  Serial.println("NET TH meter started");
  initDHT();

    }
  }

  if (!clientConnected) {    
    // connection is considered to be established only when data are received
    client = server.available();
    if (client) {
