Arduino with Flow Sensor and Relay

esoberano:
How do I modify the code to have the relay turn on after the flow sensor senses water flow for 15 seconds or more?

to use Blink Without Delay, you have to have a few things.
a register that holds the time the switch was pressed.
a flag that stops looking to see if the switch was pressed
a flag to see if the switch is being held down
a register that changes after your time
a registoer of your desired time.

this first part just looks at the switch
NewSwitch = flow sesnor or load from some other variable
if (oldSwitch doesnot equal NewSwitch) test if the switch is not closed last time through the loop
if (the switch is closed this time through the loop)
ClosedTime = millis()

this bit has duration count the time since the switch was closed.
duration = millis() - ClosedTime

this will start the pump if the switch has been closed for 15 seconds or longer
if ( duration >= 15 seconds )
then PumpStart = HIGH

this loads the status of the switch and this goes just before you end the loop scan
after everything else you do.
oldSwitch = NewSwitch
} // =========== END OF LOOP ========

this is NOT code, but a general idea of the steps to get the pump to turn ON.
you have to write the actual code.

and, it does not turn the pump OFF.