SD card data acquisition

cattledog:
EDIT: I'm not clear on what is controlling pin 3 and if there are indeed breaks and resumptions of the data recording. If you want to reset the time after a break, then set recordTimeZero back to true when pin 3 goes low and the break occurs.

Thank you so much catteldog for all your help so far. I am fairly new to arduino and have been a bit lost. The changes you made work exactly how I need it to. Pin 3 is taking a reading from the first valve to see if it has power. If the first valve in the sequence has power then the test has commenced. If there is now power to pin 3 then the program stops. Now I'm just working on having the data be written to a txt file to the pc after each cycle for 1/2 a second.