 
 // These constants won't change.  They're used to give names
 // to the pins used:
-const int analogOutPin = 3; // Analog output pin that the LED is attached to
+const int valvePin = 3; // Analog output pin that the LED is attached to
 const int analogInPin = A0;
 const int pumpPin = 4;
 const int ledPin = 13;

       Serial.print("Delay: ");
       Serial.println(delayValue);
       digitalWrite(ledPin, LOW);    // turn the LED off by making the voltage LOW
       digitalWrite(analogOutPin, LOW);    // turn the LED off by making the voltage LOW
       delay(delayValue);         // wait for a second
       digitalWrite(ledPin, HIGH);   // turn the LED on (HIGH is the voltage level)
       if (!freeze) //only if not problem
       {
         digitalWrite(analogOutPin, HIGH);   // turn the flow on (HIGH is the voltage level)
         dropCounter++;
       }
       delay(1100);               // wait for a second
       
   }
}

}

void loop() {    
  Serial.print("dropCounter: ");
  Serial.println(dropCounter);
  managePump();
  makeADrop();
}

void managePump() {
  sensorValue = analogRead(analogInPin);
  Serial.print("Sensor: ");
  Serial.println(sensorValue);
  
  waterLevelIsUp = sensorValue>sensorMax/2;
  
  if (dropCounter>150) //This should normaly never happen, the sensor should start the pump before
  {
    if (waterLevelIsUp)
    { //Too many drops without sensor activation: sensor is not working, stop everything!
      freeze = true;
    }
