MicroPython PCA9685 Library¶
pca9685
¶
Driver for the PCA9685 PWM control IC. Its commonly used to control servos, leds and motors.
Author(s): Radomir Dopieralski, Scott Shawcroft, Jose D. Montoya
pca9685
¶
MicroPython Driver for the PCA9685 PWM control IC. Its commonly used to control servos, leds and motors.
Author(s): Radomir Dopieralski, Scott Shawcroft, Jose D. Montoya
-
class micropython_pca9685.pca9685.PCA9685(i2c, *, address: int =
0x40
, reference_clock_speed: int =25000000
)[source]¶ The internal reference clock is 25mhz but may vary slightly with environmental conditions and manufacturing variances. Providing a more precise
reference_clock_speed
can improve the accuracy of the frequency and duty_cycle computations. See thecalibration.py
example for how to derive this value by measuring the resulting pulse widths.- channels¶
Sequence of 16
PWMChannel
objects. One for each channel.
- reference_clock_speed¶
The reference clock speed in Hz.
- class micropython_pca9685.pca9685.PCAChannels(pca)[source]¶
Lazily creates and caches channel objects as needed. Treat it like a sequence.
- class micropython_pca9685.pca9685.PWMChannel(pca, index: int)[source]¶
A single PCA9685 channel that matches the
PWMOut
API.