servo, ping sensor issues with arduino

Wow !! Thanks for the idea ... it worked !!! ;D

I am rotating the servo .. giving it 2 secs to complete the rotation. Then detach it. wait another 2 secs. take ping reading and attach the servo back ..

Working excellent !! I am wondering if for some reason .. the board was unable to supply required power to run both servo and sensor. I will probably run the sensor using an external source and see if that will work.

will update here !! hoping it may help others with similar problem !! Thanks !!