Data Sheet

Servo Driver HAT
PCA9685 LIBRARIES
There are some functions included in driver library PCA9685.py, you can used them
when you write your own application code.
INITIALIZE NEW OBJECT
You can create a new object for every HAT
pwm = PWM(0x40)
pwm is the object we created, PWM(0x40) is creating. by default, the I2C device
address of the module is 0x40. If you have changed the I2C address, you could use
other address to create new object.
SET PWM FREQUENCY
setPWMFreq(self,freq)
Used to set PWM frequency. This value defines the time of every pulse, that is cycle.
Parameters:
- freq: numbers (Hz), in range: 40~1000.
If you use PWM to control servo, the frequency should be 5Hz as below:
Example:
pwm.setPWMFreq(50)