Skip to content

A Python package for the Raspberry Pi to control the PCA9685 16 Channel 12-bit PWM driver.

License

Notifications You must be signed in to change notification settings

Jgunde/RPi_PCA9685

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPi_PCA9685

A Python package for the Raspberry Pi to control the PCA9685 16 Channel 12-bit PWM driver. Here's a similar alternative package.

Image of PCA9685

Dependencies:

sudo apt-get install python-smbus

Usage:

See examples/example.py for a more detailed usage example.

Import the PCA9685 class:

from RPiPCA9685 import RPiPCA9685

Create a PCA9685 object:

pca9685 = RPiPCA9685.PCA9685(i2c_address, i2c_port_num)

Set the PWM frequency:

pca9685.set_frequency(frequency)

You can set the pulse width (in microseconds) on a specific channel:

pca9685.set_pwm(channel, 1200)

You can set the duty cycle on the specific channel:

pca9685.set_duty_cycle(channel, 67)

About

A Python package for the Raspberry Pi to control the PCA9685 16 Channel 12-bit PWM driver.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages