Help in esp32 and soil moisture

Hello every one
i will copy code i need help please
The idea of ​​the project is that there is a soil sensor, a pump, and two bulbs connected to the Arduino ESP32. They were connected and work well. The problem is that I want the bulb connected to pin 25 to be activated if the humidity is more than 1800 and continues for ten minutes and does not decrease. If the humidity continues to be less than 100 for 10 minutes, the bulb connected to pin 27 is activated.
#define BLYNK_TEMPLATE_ID "*****"
#define BLYNK_TEMPLATE_NAME "Smart irrigation"
#define BLYNK_AUTH_TOKEN "**********"

#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

// ضع بيانات شبكة WiFi الخاصة بك هنا
char ssid[] = "";
char pass[] = "
*";

int relayPin = 13;
int soilPin = 34;
int ledPin = 25;
int ledPin2 = 27;

const long checkInterval = 60000; // 60 ثواني للاختبار
unsigned long startMillis = 0;
bool moistureHigh = false;

void setup() {
Serial.begin(115200);
WiFi.begin(ssid, pass);

// الاتصال بـ Blynk
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);

pinMode(relayPin, OUTPUT);
pinMode(soilPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(ledPin2, OUTPUT);
}

void loop() {
Blynk.run(); // التأكد من تشغيل Blynk في حلقة loop

int moisture = analogRead(soilPin);
unsigned long currMillis = millis();

// تشغيل أو إيقاف المضخة بناءً على مستوى الرطوبة
if (moisture >= 1800) {
digitalWrite(relayPin, LOW);
Serial.println("need water");
Serial.println(moisture);
Serial.println (currMillis);
if (relayPin=0) {
digitalWrite(ledPin, HIGH);}

// بدء المؤقت إذا كانت الرطوبة عالية
if (!moistureHigh) {
  startMillis = currMillis;
  moistureHigh = true;
}
else moistureHigh =false;


// إرسال تنبيه إلى Blynk
Blynk.logEvent("high_temp");

// إرسال البيانات إلى Blynk
Blynk.virtualWrite(V1, HIGH);
Blynk.virtualWrite(V0, moisture);
Blynk.virtualWrite(V2, ledPin2);

// تحقق من مرور دقيقتين
if (moistureHigh && (currMillis - startMillis >= 120000)) {
  digitalWrite(ledPin, HIGH); // تشغيل اللمبة في منفذ 25
  Blynk.logEvent("Moisture level has been high for 2 minutes");
  startMillis = currMillis; // إعادة تعيين المؤقت
}

} else {
digitalWrite(relayPin, HIGH);
Serial.println("No need water");
Serial.println(moisture);
if (relayPin = 1)
{digitalWrite(ledPin2, HIGH);}

// إعادة تعيين المؤقت إذا انخفضت الرطوبة
moistureHigh = false;
// إرسال البيانات إلى Blynk
Blynk.virtualWrite(V1, LOW);
Blynk.virtualWrite(V0, moisture);
Blynk.virtualWrite(V2, LOW);

}

delay(400); // تأخير للتكرار
}

In the Arduino IDE click on Edit then Copy for Forum. That will copy your code. Then come here and do a paste.

Hello, do yourself a favour and please read How to get the best out of this forum and post accordingly (including code with code tags and necessary documentation for your ask like your exact circuit and power supply, links to components etc).