Merging Two Codes?

Read this
http://forum.arduino.cc/index.php?topic=223286.0