Servo won't respond with ultrasonic sensor

I have no idea. Fix the power first - as I said before, it's the primary culprit in servo related issues. There's little point trying to debug the code until that is fixed. What is the current battery pack?