Arduino Obstacle Avoidance

I am working on making an autonomous robot with the Arduino and the Adafruit Motor shield. I am terrible at coding for the Arduino can anyone help me get started?

That all depends what you want the Arduino to do with your motor shiedl. Please elaborate.

Basicley I have a tamaya twin motor gear box wired to my motor shield. I want the arduino to take a reading from 2 IR LEDs and determin the distance from an object by reading the bounceback with 2 receiving IR LEDs. And control the motor direction to avoid it. Id also like to have the IRs mounted on a servo to pan the area and see what is around it.

(Sorry for typos I’m on my phone)

Instead of IR LED's i am going to use this https://www.makershed.com/ProductDetails.asp?ProductCode=MKPX5 the PING))) Sensor from Paralax