WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

Servo Driver (Software PWM)

This is a servo driver for controlling servos that are plugged directly into your board and uses software PWM to control each servo.
For software PWM each servo in the list can be attached to any I/O pin you like. However it does require more processing overhead and you are limited by the number of 16 bit timers available. Software PWM signals are not as accurate as hardware PWM signals because they are effected by other devices (ie interrupts from UARTs, timers etc) so you may experience some jitter - although with 'modified servos' this isn't noticeable.
Note that if you have a lot of servos then you can break them down into separate lists, or 'banks' each with their own driver and timer.
When using software PWM to control a large number of servos, ie more than 10, then research suggests that performance is optimal when you split the servos into several banks with each bank containing the same number of servos.
Just use the generic example in Actuators
Function Summary

Valid XHTML 1.0 Transitional