PCA9685-driver

Driver module for PCA9685 pwm (LED/Servo) controller


License
Other
Install
pip install PCA9685-driver==1.2.0

Documentation

Build Status Coverage Status

About

Driver for PCA9685 controller. Datasheet: https://www.adafruit.com/datasheets/PCA9685.pdf

Install

pip install PCA9685-driver

Example

from pca9685_driver import Device

# 0x40 from i2cdetect -y 1 (1 if Raspberry pi 2)
dev = Device(0x40)

# set the duty cycle for LED05 to 50%
dev.set_pwm(5, 2047)

# set the pwm frequency (Hz)
dev.set_pwm_frequency(1000)

Hardware environment

This driver tested only with Raspberry Pi 2 and Adafruit 16-Channel 12-bit PWM/Servo Driver