programming of 4wd robot using ping sensor

What's the point of the pulseIn after the call to "ping"?

Where's your "setup"?