user10557: I'm using an Arduino to control a reverse osmosis machine, I would like after a certain number low pressure events to return to the testing routine. Can you call to previous functions? 

user4143: You need to get your head around the Finite State Machine (FSM).
It is a programming method which allows your program ("Machine") to be in any of a certain number ("Finite") of states ("State").  One state would be reading pressure. Another state would be "testing", or whatever.
I wrote a tutorial ages ago about it: http://hacking.majenko.co.uk/finite-state-machine

10557: <p>I'm using an Arduino to control a reverse osmosis machine, I would like after a certain number low pressure events to return to the testing routine. Can you call to previous functions? </p>
 4143: <p>You need to get your head around the Finite State Machine (FSM).</p>

<p>It is a programming method which allows your program ("Machine") to be in any of a certain number ("Finite") of states ("State").  One state would be reading pressure. Another state would be "testing", or whatever.</p>

<p>I wrote a tutorial ages ago about it: <a href="http://hacking.majenko.co.uk/finite-state-machine" rel="nofollow">http://hacking.majenko.co.uk/finite-state-machine</a></p>
