The script posted has been uploaded to the Arduino and performs as expected. I just to need it to restart the loop when the push button (pin 4) is pushed, and ideally at line 95 when total milliitres > 1000 prompts line 96 the solenoid valve (pin 5) closes to stop printing recorded data until (pin 4) is pushed reinitiating the loop/measurement.