shocking servo

I'm trying to control a servo with a joystick.

I first tried to just make the servo turn by sending it to a position, waiting a bit and then to another position.

 

Now I tried to change the on pulse with a joystick.

But the result was not so good. The closest I got to making it work, my servo shock every second.

Anyone who can help me out?