|
that is correct, you only need to declare the Input and Output once. As far as I can tell, the code looks right to me. If I understand it right, as soon as the pressure falls below the minimum, the pump will turn on and stay on until it reaches maximum. At that point, it will stay off until it drops below the minimum again. Correct? The only thing you might want to do is initialize all your variables (including out2) before starting the main loop.
|