4x4 platform help plz

There are numerous examples provided with the Arduino IDE. There are numerous more examples on the playground. You need to find, execute, and understand those examples for one piece of hardware at a time. Get some data from the ping sensor. Make a motor turn on and off.

Where you get an obstacle avoiding sketch is from the ends of your fingers. What does YOUR robot need to do to avoid obstacles? What can YOUR robot do to detect obstacles?