Look at the 'blink without delay' example.
Hi, just a suggestion, your emergency stop button should be separate to the arduino.Make the emergency switch break the power supply to the pump motor.That way if the arduino locks up or some hardware problem, you are removing the supply and the motor has to stop.Also a circuit diagram of your project will help us help you.How are you driving the motor from the arduino.Tom....
I suggest you also use the watchdog timer, to reset the Arduino if it locks up (in case the pump it turned on at the time).
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16