Control many servos at once without delay or interrupts while applying rotation adjustments with PWM/PPM. Quickly calibrate each servo in the constructor() by setting the min and max pulse length (in microseconds), then make real-time adjustments to the rotation with moveToDegrees().
Connect as many servos as the number of digital pins available on your Arduino. This library is very fast and has a small, lightweight code footprint.
You must continuously call update() inside of loop() in order to use theReal-Time methods tagged below.
Pass in an integer for the digital Arduino pin that is connected to the servo movement control wire (orange or yellow).
For the second and third parameters; pass in unsigned longs for the hardware specified microsecond pulse min and max times, which determine the time limits for calculating the length of the orientation pulse (typically between 1000-2000 microseconds, or 1-2 milliseconds).
Provide an unsigned long to set the amount of time between each orientation pulse. The default is 20ms and is set automatically in the constructor().
Provide an integer to set the maximum number of degrees of rotation the servo can handle. The default is 180 degrees and is set automatically in the constructor().
Keep processing and applying servo movements to the motor. This must be called continuously within loop() in order to use moveToDegrees().
Provide an integer and the servo will move to the specified position in degrees. This can be called inside of setup() or also at run-time inside of loop().