       }
     }
     lastPowerCheck = millis();
+  }
+  // Check the temperature and update the server
+  if (millis() > lastTempCheck + TEMP_CHECK_FREQUENCY) {
+    checkTempHumid();
+    lastTempCheck = millis();
   }
   // Check status to update variables
   computerOn = digitalRead(POWER_LED);

  }
  server.send(200, "application/json", "{\"status\":\"complete\"}");
}

}

void getStatus() {
  String preString = "{\"relayOn\":\"" + String(relayOn) + "\",\"computerOn\":\"" + String(computerOn) + "\",\"relayOffWhenPowerDown\":\"" + String(relayOffWhenPowerDown) + "\",\"temp\":\"" + String(temp) + "\"}";
  const char * result = preString.c_str();
  server.send(200, "application/json", result);
}
