Datasheet
Again using the example code, edit SERVOMAX until the high-point of the sweep reaches the maximum range of
travel. Again, is best to approach this gradually and stop before the physical limit of travel is reached.
Converting from Degrees to Pulse Length
The Arduino "map()" function is an easy way to convert between degrees of rotation and your calibrated SERVOMIN
and SERVOMAX pulse lengths. Assuming a typical servo with 180 degrees of rotation; once you have calibrated
SERVOMIN to the 0-degree position and SERVOMAX to the 180 degree position, you can convert any angle between
0 and 180 degrees to the corresponding pulse length with the following line of code:
Use caution when adjusting SERVOMIN and SERVOMAX. Hitting the physical limits of travel can strip the
gears and permanently damage your servo.
pulselength = map(degrees, 0, 180, SERVOMIN, SERVOMAX);
© Adafruit Industries https://learn.adafruit.com/adafruit-16-channel-pwm-slash-servo-shield Page 22 of 27