UKHeliBob:
Save the value of millis() when the signal becomes greater than the lower theshold and less than the upper threshold, then each time through loop() test whether the current value of millis() is equal to or greater than the required period. If so then act accordingly
Hmm, I think this could work. Let me try it and see if it runs properly. Thank you for the suggestion.