Program Question using Millis() for Well Pump Control with Float Switch

I’m fairly new to arduino. First time trying to use Millis(), or mutiple condition IF statement. Basically this is supposed to turn on a well pump for 15 seconds every 15min, unless the float switch in my buffer tank it closed (HIGH). I’m sure it’s simple but I’ve tried for hours to figure this one out. It’s not turning on, ever at the moment.

unsigned long previousMillis =0; //stores last time valve was open
unsigned long holder = 0; 
long OnTime =15000; //length of time to open valve
long OffTime =900000; //length of time to close valve

void setup() {
  // put your setup code here, to run once:
  pinMode(solinoidvalvePin,OUTPUT);
  pinMode(floatswitchPin,INPUT);  
}

void loop() {
   unsigned long currentMillis = millis(); 
  
        if(((currentMillis - holder) >= OffTime) && (digitalRead(floatswitchPin)== LOW) && ((currentMillis - previousMillis) <= OnTime)){
         digitalWrite(solinoidvalvePin,HIGH);
         previousMillis = currentMillis;
         holder = currentMillis;
         
        } else { 
           digitalWrite(solinoidvalvePin,LOW);
         previousMillis = currentMillis;
         } 
}

You are not using the internal pullup resistor for the float switch. So, how IS the switch wired?

        if(((currentMillis - holder) >= OffTime) && (digitalRead(floatswitchPin)== LOW) && ((currentMillis - previousMillis) <= OnTime)){

You really should not be using compound if statements like this. It is, or it is not time to turn the pump on.

If it is, it is, or is not, necessary to do so, based on where the float is.

It is, or is not, time to turn the pump off. THAT has NOTHING to do with whether it is time to turn the pump on. It has NOTHING to do with where the float switch is.

Do NOT try to do everything in one statement when multiple, nested or non-nested, statements make more sense.

Might I suggest:

unsigned long startTime, cycleTime = 900000, onTime = 15000;
const byte solinoidvalvePin = ?, floatswitchPin = ?; //pin numbers
bool pumpON;

void setup() {
  // put your setup code here, to run once:
  pinMode(solinoidvalvePin,OUTPUT);
  pinMode(floatswitchPin,INPUT_PULLUP); //wire switch between pin & GND
}

void loop(){
  if(millis() - startTime < onTime)
    pumpON = true;
  else
    pumpON = false;
  if(millis() - startTime > cycleTime)
    startTime += cycleTime;
  if(pumpON == true && digitalRead(floatswitchPin) == LOW) // LOW or HIGH ?
    digitalWrite(solinoidvalvePin,HIGH);
  else
    digitalWrite(solinoidvalvePin,LOW);
}

Untested: Put the pin numbers you are using in line 2 and adjust switch state ( high or low) in line 18 to suit.

is it trash now? this started all of the sudden

Sketch uses 1,062 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 14 bytes (0%) of dynamic memory, leaving 2,034 bytes for local variables. Maximum is 2,048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xcd
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xcd
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xcd
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xcd
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xcd
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xcd
avrdude: stk500_recv(): programmer is not responding
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xcd
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xcd
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xcd
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xcd

Hopefully you're not trying to run the pump directly from an output pin, can you post a wiring diagram?

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

So, did you? "Whine on the forum" is way down on the list. By the time you get there, you should know the questions that are going to be asked, and have answers ready. You really shouldn't even need us to ask the questions.

The output pin turns off and on a little arduino relay board, I forget what model. I'm actually an industrial automation guy so I know how this stuff works. I just lack experience with C and arduinos. At one point a few drops of water "may" have hit the arduino, I have another one I'll have to wire it up and try it out.

At one point a few drops of water "may" have hit the arduino,

Hmmm. That sucks. Arduino's are teetotalers. They live in dry states.