Obstacle avoiding Robot(2 Wheeled)

I am making an obstacle avoiding Robot with the help of Arduino UNO and Adafruit Motor Shield.It is a two Wheeled Robot and it uses one ULTRASONIC DISTANCE SENSOR to calculate the distance.The sensor is mounted on a servo motor(it chooses the best possible direction).It's my very first project with Arduino and i am having a very hard time dealing with Sketching.Can somebody Help me out with the code..It's urgent Please :cold_sweat: pls..pls..pls

Post what you have already. Also you are not the first person to do this, so a simple google search should be very beneficial for you.

Google it.... U will find what u need. We promise :)

There are numerous examples online. Include the word "arduino" at the beginning of your search topic and "example" at the end of the keyword string.

Previous forum post to read.

https://www.google.com/search?as_q=obstacle+avoiding+Robot&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=http%3A%2F%2Fforum.arduino.cc%2Findex&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=&gws_rd=ssl

Conceded.