   
   if(soil > h_upper){
     digitalWrite(relay_2, LOW);
+  }
+  
+  if(ah > 70){
+    fan_pump = true;
+    digitalWrite(relay_3, HIGH);
+    digitalWrite(relay_4, HIGH);
+  }else{
+    fan_pump = false;
+    digitalWrite(relay_3, LOW);
+    digitalWrite(relay_4, LOW);
+  }
+  
+  if(temp > 40){
+    digitalWrite(relay_3, HIGH);
+  }else if(!fan_pump){
+    digitalWrite(relay_3, LOW);
   }
   
   send_log(lux, temp, soil, ah);

  float temp = temp_sensor.getTempCByIndex(0);
  Serial.println(temp);
  
  int h = constrain(analogRead(h_pin), 255, 1005);
  int soil = map(h, 255, 1005, 100, 0);
  Serial.println(soil);
  
  DHT11.read(ah_pin);

  lcd.print((char)223);
  lcd.setCursor(19,3);
  lcd.print("C");
  delay(1000);
}

