Press to start, run X time wait to press to continue

New to Arduino but learning simple things. I need to power up, wait for input (press to start) then enable a relay for X time...once done wait for input (press to continue) for Y time etc for 6 cycles:

PRESS TO START (press button)
WASH CYCLE (water pump for 5 min)
Press "CONTINUE"
SOAP CYCLE (soap and water for 5 min)
Press "CONTINUE"
RINCE CYCLE (water pump for 5 min)
Press "CONTINUE"
SANITIZE CYCLE (water pump and sanitizer for 5 min)

End program until "PRESS TO START" initiated.

//Reason for Press to Continue is to ensure there are no isses and system ready to start next cycle.

Hi
Search google for state machine.

What's your question though? Do you need advice on hardware or programming? If the latter what have you tried so far?

The easiest way to do this is to just use delay() for all those 5 minute phases and a while() to hold it waiting for the button to be pressed. Not elegant at all, and not future proof since using delay() can paint you into a corner if you need to add other features. But quick and simple.

I think you need to say more about what you've done already and what help you need.

(Wondering why you posted this is LEDs and multiplexing...)

Hello
Post your sketch, well formated, with comments and in so called code tags "</>" to see how we can help.
Have a nice day and enjoy coding in C++.

Thanks for the help. I have the basic program done that works after following your input. It runs once then ends in an infinate loop that requires re-boot/reset to go again. Next step is getting a display to indicate status.(don't think I need the PRESS TO CONTINUE) function.. My bad for posting in this section, all new to me. soaking up examples, etc for this simple project. (Basically a soak/wash/rinse/sanitize/finish program)...Think of it as a dish washer I can customize with a LCD screen for status.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.