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.
- setConfig - Changes the servo centre position and range at runtime.
- connect - Connect the actuator to the drive system.
- disconnect - Disconnect the actuator from the drive system. Once an actuator is disconnected it will stop responding to other commands until it is connected once again.
- getSpeed - Returns the value you specified in your previous call to setSpeed.
- isConnected - Test if an actuator is connected
- isInverted - Test if an actuator is inverted
- setConnected - Connect or disconnect the actuator from the drive system.
- setSpeed - Set the required speed to a value between DRIVE_SPEED_MIN and DRIVE_SPEED_MAX.