Need help on multitasking program

You posted code, good but...

Please read this topic: How to get the best out of this forum - Using Arduino / Project Guidance - Arduino Forum

Post the entire code, first autoformatted in the IDE, then pasted in code tags.

What's is Your question, the schematics?
What happens and what do You want to happen?