Oxygen Concentrator valve timings

Take a look here: Naming.

I was going to type some commentary on good naming, but @StefanL38 did it for me earlier and as a programmer, I like reuse :wink:

It seems that at its core, your program goes through a number of stages, controlled by elapsed time and at each stage turns valves on and off.

As I said before, a state machine is one way to do this, but equally an array of structs would be handy too. Each struct can specify the desired state of each valve for that stage and how long it should last. Then all that repetition goes away and your code is a for loop and some check to see if it's time for the change to a new state.