Making a PING sensor control a DC motor

Hi, guys. I'm kinda new to this robot-scene. I've been doing it for about 3 days i bought a arduino uno r3 and a few other odds and ends to make a simple robot. ive got 2 DC motors(3v), A PING sensor, and everything else to make a robot(don't feel like going into detail lol). I know how to run the motor and the sensor by themselves but i need some help making the sensor and the motor cooperate. Any ideas

 

P.S. i have programming knowledge so i dont need it (dumbed) down lol

here is a pic…ask if you need another

2014-02-21_19-37-01_255.jpg

here is a pic…ask if you need another

2014-02-21_19-37-01_255.jpg