Water Level Sensor

Hi, Im basically am still new to arduino so im not sure why its not working properly,

int switch10 = 10; //bottom water level sensor
int switch11 = 11; //top water level sensor
int relay = 1; //5v relay

//sensor reading is HIGH when not detecting water

void setup()  
{ 
  Serial.begin(9600); 
  pinMode(switch10,INPUT); 
  pinMode(switch11,INPUT);  
  pinMode(relay,OUTPUT); 
}  



void loop()  

{
  

  
    if ((digitalRead(switch10)== LOW) && (digitalRead(switch11)== LOW)) 
      {  
         Serial.println("Tank Full"); 
         delay(1000); 
         digitalWrite(relay,HIGH);
         delay(1000);
         
            while (((digitalRead(switch10)== LOW) && (digitalRead(switch11)== LOW)) || 
                   ((digitalRead(switch10)== LOW) && (digitalRead(switch11)== HIGH))) 
                      { 
                        
                        Serial.println("Tank Full or Sinking – Run Program"); 
                        delay(2000);  
                        
                        
                       } 
      }     
                    

   if ((digitalRead(switch10)== HIGH) && (digitalRead(switch11)== HIGH)) 
      {  
         Serial.println("Tank Empty"); 
         delay(1000);  
         digitalWrite(relay,LOW);
         delay(1000); 
    
            while (((digitalRead(switch10)== HIGH) && (digitalRead(switch11)== HIGH)) || 
                   ((digitalRead(switch10)== LOW) && (digitalRead(switch11)== HIGH))) 
                      {
                     
                        Serial.println("Tank Empty or Rising – Stop Relay"); 
                        delay(2000); 
                        
                       } 
          
      }   }

ISSUES: :confused:

1)Can you guys tell me why my relay isnt Getting HIGH or LOW in this one ? The serial.println are working perfectly. But the state of my relay(outoput) isnt changing even when i have a digitalWrite.

2) The state of my relay is always HIGH even when its not detecting something . Its supposed to LOW

3) Is it normal to have sensors LOW state when its detecting something. ISnt it suppost to be HIGH?

Do you know which pins Serial uses? If not, you need to learn. And, you need to learn to not use those same pins for other purposes.

PaulS: Do you know which pins Serial uses? If not, you need to learn. And, you need to learn to not use those same pins for other purposes.

Yes I know the basic pin connection and numbering

Angelkiller17: Yes I know the basic pin connection and numbering

So, why is your relay on the hardware serial pin?

ooooooooh Pin 1 ... ooops sorry im just a newbie