Giter Club home page Giter Club logo

pca9685_py's Introduction

Taken from Adafruit and modified for my own purposes

See also PCA9685_PWM.py from https://github.com/pvint/CHIP-Scripts for usage info

original content follows

Adafruit Python PCA9685

Python code to use the PCA9685 PWM servo/LED controller with a Raspberry Pi or BeagleBone black.

Installation

To install the library from source (recommended) run the following commands on a Raspberry Pi or other Debian-based OS system:

sudo apt-get install git build-essential python-dev
cd ~
git clone https://github.com/adafruit/Adafruit_Python_PCA9685.git
cd Adafruit_Python_PCA9685
sudo python setup.py install

Alternatively you can install from pip with:

sudo pip install adafruit-pca9685

Note that the pip install method won't install the example code.

pca9685_py's People

Contributors

pvint avatar

Watchers

 avatar James Cloos avatar

pca9685_py's Issues

Add option for multiple channels

It would be nice to be able to control several channels at once, something like:
-c 1 -c 2 -c 15

Even better would be range, like:

-c 1-2

or REGEX:

-c [1457]

This may not be practical (not referring to the REGEX part - that's brilliant), since there will be problems fading in/out from current position.
Possibility: Could start fading first from the farthest one from desired position and then when the fading position hits where the others are start fading them too.

Add invert option

Need to have a --invert option to invert the outputs to simplify NPN vs PNP drivers on outputs

Staggered on/off times

From the datasheet:
"The PCA9685 allows staggered LED output on and off times to minimize current
surges. "

Are we doing this? Verify.

Duty Cycle is being modified differently for -1 ALLCALL and one channel

Rec 709 formula is being used for duty cycle to adjust brilliance to make it look right when a single channel is given but not when channel is ALLCALL (ie: -c -1)

Duty cycle should be true always. Maybe add option for "brilliance" or "percent" that will be a value 0-1 or 0-100 and will be adjusted by Rec 709 to make it look right to human eyes.

There's a bounce when dimming to lower level

When dimming from 100% to 10% it is fluid, but at the end there's a visual "bounce". It is fairly subtle, but noticeable.

 python PCA9685_PWM.py -a 0x42 -b 1 -s 5 -c 12 -d 100
 python PCA9685_PWM.py -a 0x42 -b 1 -s 5 -c 12 -d 10

On the way down you can see a "bounce". May also exist on the way up but I cannot see it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.