Guys, I'm currently developing a code for my project, that basically turns a servo a certain number of degrees, by a corresponding pulse from the comparator circuit that i built. It is working fine, along with the reactions, but there is one problem, as there is a continuous pulse on the input of the arduino, it turns the servo, but, it goes back and forth to the desired position, making it move quite a lot, rather than staying put on the position. How to eliminate this? Here's a copy of the code.