Setup:
I am using a MEGA2560 to control an array of 20 air intake solenoid valves. Each intake valve opens for 5 minutes. The airflow from the solenoids goes into an sampling instrument hooked to a datalogger (Campbell CR10X), which records the sample value at the end of each 5 minute period. The Arduino cycles through the 20 values continuously.
Problem:
I would like to synchronize the Arduino to the datalogger at 100 minute intervals (the full sampling cycle). Rather than have the Arduino and the datalogger completely independent and synchronized solely by time, I would like to send a signal from the datalogger to the Arduino at the start of each full cycle. This way, when I periodically upload changes to my datalogger program (thus restarting the cycle) the Arduino would automatically restart back to the first solenoid in the series and be synced with the datalogger. This would also take care of any drift between the timer on the Arduino and the timer on the datalogger.
Question:
What is the best way to accomplish this? I would need to know what kind of input to the Arduino is best (the datalogger can send a 5V +/- 0.1V pulse with a duration of 1ms, 10ms, 100ms, or 1s), as well as the programming function that would best handle the input.
Thank you.
-Dave