Help with "until" loop

Please post a complete sketch that you have been using but haven't showed us.

The last sketch does nothing with the eyes, so it is hard to see how manipulation of the eyes will test your logic.

If the flush solenoid is waiting for an hour to go by, should any cessation of the other solenoid cancel that, and reset the flush mechanism so it will trigger again once the other solenoid is eye-triggered?

Even if one hour has not gone by?

Examine @gcjr's handling of the on/off for the flush - your use of two if statements messes up the timers as you don't know if you are coming (timing twenty seconds) or going (timing one hour).

The switch/case statement only does one of the two timed sections. It times out the on time, then switches to timing out the off time. Rinse and repeat.

Add some conditions on that to start and stop it and you'll be done.

a7