Smooth Motion with a Hobby Servo

Simulating Smooth Motion Using Small Steps

The .write(n) method in the Servo library allows the use of two different
ranges of values to set the servo’s positon:

The exact range of steps allowed by a particular servo depends on the
model. A TowerPro SG90 has the following (typical) specs:

Since there are 1000 steps between the two extreme positions which are 180°
apart, this servo can be stepped in 0.2° increments.

By making the servo move in small steps with small delays between each step,
you can simulate smooth motion on a standard hobby servo.

Real Smooth Motion Using Constant Velocity Requires a Modded Servo ###

Soon after RC cars became available with servo motors, hobbyists learned
how to “mod” the motors so that they could execute continuous motion, i.e.,
motion to any angle, not just 0° through 180°. These “modded” servo are
called “continuous rotation servos”. This type of mod became so popular
that nowadays many manufacturers provide continuous rotation servos in their
product line-up. They are not much more expensive (if at all) than
regular, unmodded servos.

If you use the Arduino Servo library to control a continuous rotation
servo, then its .write() method sets the speed, but not the position: