How to add Ping))) to this code

I have searched the internet for about four hours trying to find a good example on how to wire and Arduino Mega, L289N Motor Control, and a Parallax Ping))) all together? I was tired of searching the internet and didn't look on the forum. If you know how or know of a good/great example that shows how and with some code, could you point me in that direction?

Thank you.

P.S. I did wire every but I didn't power it up since I am afraid that I would fry my Mega and I have already did that once.