Hi there!
first Post around here, hope you guys can help me out with this little issue....
So I've created a little system for controlling my ventilator and I've setup various Menu's for this (Always-on-mode, off-mode, ECO-mode etc.)
In the Menus itself is a while loop which runs a couple of things and checks whether a certain button is pushed or not. As soon as I push this button the mode exits and returns to the "main" menu where I can select on of the other menus.
Now as these loops are fairly quick (max 2 secs) I only have to keep the button pushed for max 2 seconds for the menu to quit. Except for the ECO mode...
In this one I would like the ventilator to run for 1 minute and then pause for 5. Which means that 6 minutes pass until the "is-the-button-pushed" condition is checked again. So in order to get back to the other menus I would have to, in the worst case, keep the button pushed for 6 minutes... You get the impracticality of that...
I tried implementing a for loop that checks if the button is pushed within the while-loop but it did not really work....
Any ideas what could be the best solution here?
Thanks a lot and stay safe!
Pete