Problems &&

Good morning

I am doing a project in which I need to use the while condition reading the states of two sensors, the condition will only be executed if both sensors are low. At the moment it is not executing the while when both functions are fulfilled, it is only executing when one function is fulfilled. Therefore the && function is not running correctly.

  sensorban_state1 = digitalRead (sensorbandeja1);
   sensorban_state2 = digitalRead (sensorbandeja2);
   delay (500);
 ///////////////////ENTRA AGUA///////////
    while(sensorban_state1==LOW && sensorban_state2==LOW)
    {
      sensorban_state1 = digitalRead (sensorbandeja1);
      sensorban_state2 = digitalRead (sensorbandeja2);
      delay (500);
      estado_reseteo();
      digitalWrite(sole_a,LOW);  // encender la solenoide del agua
      //digitalWrite (pump_recir,LOW); // encender bomba de recirculación 
      //digitalWrite (sole_recir,LOW); // encender solenoide de recirculación
      
     }

There is nothing obviously wrong with what you posted, so the real error is somewhere else.

Please post the complete code, and provide the evidence showing that that line of code is not “working”.

&& definitely works.