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

Serial Servo Driver

A generic solution for using various different serial servo controllers.
Currently this driver supports the following serial protocols:-
Check the data sheet of your servo controller to see if it supports any of these protocols and, if so, whether you need to configure it in any way to support the required protocol.
The Mini SSC protocol only sends 3 bytes to move a servo whereas the Pololu Compact protocol requires 4. If your robot has lots of servos, such as a humanoid, then you want to send the message for all of the servos as quickly as possible. So the protocol requiring the fewest bytes is normally the best choice and you should use the fastest possible baud rate.
The only 'disadvantage' of the Mini SSC protocol is that you cannot change the center and range positions of the servo. However: some controllers such as the Pololu Maestro series have an application to allow you to do this.
This driver only requires two wires between the micro controller and the servo controller. You must connect the Ground supply from your micro controller to the Ground supply on the servo controller as well as the Transmit pin from your micro controller UART to the receive pin of the servo controller. This allows you to connect multiple servo controller boards to the same UART - often referred to as 'daisy chaining'.
If your board supports daisy chaining then you normally have to configure each board to respond to a different starting number for the servos. For example: if you have 16 servos and 2 controller boards that support 8 servos each then configure one board to start at servo 0 (so it controls servos 0 to 7) and configure the other board to start at servo 8 (so it controls servos 8 to 15).
Example
Just use the generic example in Actuators
Function Summary

Valid XHTML 1.0 Transitional