You cannot steer around an object with just sonar (mostly).
The reason is because the robot has no idea where it is, just where the object is with respect to the robot. The robot will have no idea when its gone around the object!
You will need to also use an encoder or digital compass so that the robot knows its heading and general direction.
Ill write a tutorial on this sometime this summer when I get more time . . . there are like 10 basic algorithms and a billion more advanced ones for object avoidance . . .
My Fuzzy robot
used sonar to avoid objects, but it only had a random heading with no end goal location . . . source code can also be found on that page . . .