   if (!waterPumpIsOn && waterLevelStatus == "OK" && moistureThreshold > moistureSensorVal) {
     prevWatering = millis();
     waterPumpIsOn = true;
-    digitalWrite(WaterPump, HIGH);
+    digitalWrite(waterPumpPin, HIGH);
     Console.println("Watering started");
   }
 }

unsigned long hourTwelveInterval = 43200000;

void setup() {
  pinMode(LightSwitch, OUTPUT);
  pinMode(WaterPump, OUTPUT);

  myDHT.begin();
  Bridge.begin();

void waterPlantStops(unsigned long currentMillis) {
    if (waterPumpIsOn && currentMillis >= prevWatering + wateringSeconds) {
    waterPumpIsOn = false;
    digitalWrite(waterPumpPin, LOW);
    Console.println("Watering stopped");    
  } else if (waterPumpIsOn && moistureThreshold < moistureSensorVal) {
    waterPumpIsOn = false;
    digitalWrite(waterPumpPin, LOW);
    Console.println("Watering stopped");
  } else if (waterPumpIsOn && waterLevelStatus == "LOW") {
    waterPumpIsOn = false;
    digitalWrite(waterPumpPin, LOW);
    Console.println("Watering stopped");
  }  
}

void switchLights() {
  if (lightOnThreshold > lightResistorVal && !lightIsOn) {
    digitalWrite(lightSwitchPin, HIGH);
    lightIsOn = true;
  } 
  if (lightOnThreshold < lightResistorVal && lightIsOn) {
    digitalWrite(lightSwitchPin, LOW);
    lightIsOn = false;
  }   
}
