   }
 }
 
-void updateSmartValues(short timeMinutes, short LDRLight) {
+// Adds current values to the smartlearning, currently not used because of lack of time
+void updateSmartValues() {
+  short timeMinutes = hour() * 60 + minute();
+  short LDRLight = analogRead(ldrPin);
+
   // Add the new values
   if (timeArrayPosition >= numValues)
     timeArrayPosition = 0;

// Check for turing on the light using the smart function
void smartCheck() {
  unsigned long curTime = millis();
  if (curTime > (lastCheck + interval) || lastCheck < curTime) {
    lastCheck = curTime;
    //Serial.println("Check");
    short currentLightValue = analogRead(ldrPin);

void onData(SocketIOClient client, char *data) {
  if (strstr(data, "Time:")) {
    timeUpdate(data + 5);
  } 
  else {
    int lightNumber;

    // Light 1
