servomotors as shown in Figure 12.
Servos are connected with three wires. Ground is
usually black or brown, and the positive supply voltage is
usually red or orange. The control signal is supplied over the
third wire which is often white or yellow.
Normally, a continuous rotation servo will stop
moving when it receives a pulse whose width is in
the center of its range. If either of your robot’s
servomotors continue to rotate when the robot should be
stationary, you can correct it by increasing or decreasing
the value of its StopOffset from its default value of 128
(see Figure 13).
The same programs used to control the DC robot can
control the servomotor version as long you initialize the
RROS chip properly. Figure 13 shows an appropriate
subroutine for the servomotor initialization. Drift and
movement times are set just like a DC motor. Servomotors,
though, require one additional setup.
Next month, we’ll see how easy it is to add sensors to
the robots discussed in this article. We will also program
some simple behaviors to demonstrate how easily an RROS
based robot can be controlled with RobotBASIC. SV
58 SERVO 12.2017