#define UT_TOP 2 // UPPER TANK TOP SENSOR
#define RT_BOT 3 // RESERVE TANK BOTTOM SENSOR
#define RT_TOP 4 // RESERVE TANK TOP SENSOR
#define MOTOR1 13 // Pin to control the relay
void setup() {
Serial.begin(9600);
pinMode(UT_TOP, INPUT_PULLUP); // Configure the float sensor pins as inputs
pinMode(RT_BOT, INPUT_PULLUP);
pinMode(RT_TOP, INPUT_PULLUP);
digitalWrite(MOTOR1, HIGH); // Ensure the pump is off at the start
}
void loop() {
// bool isRTLow = digitalRead(FLOAT_SENSOR_RT) == LOW; // Assume LOW means float sensor is triggered
// bool isRSFull = digitalRead(FLOAT_SENSOR_RS) == LOW; // Assume LOW means float sensor is triggered
// Serial.print("RT Low: ");
// Serial.print(isRTLow);
// Serial.print(", RS Full: ");
// Serial.println(isRSFull);
// if (isRTLow && isRSFull) {
// digitalWrite(PUMP_PIN, HIGH); // Turn on the pump
// Serial.println("Pump ON");
// } else {
// digitalWrite(PUMP_PIN, LOW); // Turn off the pump
// Serial.println("Pump OFF");
// }
// delay(2000); // Wait for 2 seconds before the next check
}