Servo motors can be jerky sometimes. Moving from one position to the other too fast, making these mostly ignorable jerks.
We can smoothen the servo movements by controlling our acceleration and deceleration.
This code only works with minimal to no delays for the smoothing operation. For more complex projects, check out multitasking on the arduino (Ditch that Delay).
The source code used in this project is based on the following video by James Bruton.