washing machine Arduino program

alex3241:
Please explain me more about what you are writing here

I just mean that it would be worthwhile learning about object-oriented design/programming in general, and how it can be implemented in C++ (the language used to program Arduinos). It's a very big subject but very useful as programs grow, to avoid them becoming overly complex and hard to maintain.