How to merge three scetches?

In the first post of this Thread I wrote an extended example of the Blink Without Delay concept. It may be similar to what you are trying to do.

...R