well it is quite simple actually to do obstacle avoidance and simultaneosly follow use the sharp ir ,
have u seen any sumo bot competition , ull see that the bots will normally avoid the white boundary linw ans also seek out the other robot, now how u do that??
when the sharp ir is scanning and getting data, call for another adc conversion for the ir leds. now do a decision according to the data found , suppose any of the ir sensors get a data which means that u have to avoid something then stop all other functions of the robot and keep turning the robot away from the obstacle for 3 or 4 secs which will be sufficient for obstacle avoidance, aafter obstacle has been avoided continue with ur scanning session and do whatever ur robot is meant to do..