Merging Two Codes?

Read this "Demonstration code for several things at the same time" by @Rebin2 Robin2
you will able to see how to do things at the same time
http://forum.arduino.cc/index.php?topic=223286.0