Coder Social home page Coder Social logo

adafruit_python_pca9685's Introduction

!! DEPRECATED !!

This library is deprecated and has been archived. Please use the new library here: https://github.com/adafruit/Adafruit_CircuitPython_PCA9685

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.

adafruit_python_pca9685's People

Contributors

caternuson avatar tdicola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit_python_pca9685's Issues

I can't run this with Python 3? (Raspberry Pi)

Thank you for opening an issue on an Adafruit Python library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Python/Raspberry Pi projects check these very common issues to ensure they don't apply:

    • If you are receiving an ImportError: No module named... error then a
      library the code depends on is not installed. Check the tutorial/guide or
      README to ensure you have installed the necessary libraries. Usually the
      missing library can be installed with the pip tool, but check the tutorial/guide
      for the exact command.

    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and power in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.

    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): INSERT PLATFORM/OPERATING
    SYSTEM HERE

  • Python version (run python -version or python3 -version): INSERT PYTHON
    VERSION HERE

  • Error message you are receiving, including any Python exception traces: INSERT
    ERROR MESAGE/EXCEPTION TRACES HERE
    *

  • List the steps to reproduce the problem below (if possible attach code or commands
    to run): LIST REPRO STEPS BELOW

setuptools-3.5.1.zip download not working

Install procedure via download of https://pypi.python.org/packages/source/s/setuptools/setuptools-3.5.1.zip does not work anymore. It's not hosted there anymore.

pi@raspberrypi:~/Adafruit_Python_PCA9685 $ sudo python setup.py install
Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-3.5.1.zip
Extracting in /tmp/tmpYeIU5n
Traceback (most recent call last):
File "setup.py", line 4, in
...
zipfile.BadZipfile: File is not a zip file

How to control the rotation angle

Thank you for opening an issue on an Adafruit Python library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Python/Raspberry Pi projects check these very common issues to ensure they don't apply:

    • If you are receiving an ImportError: No module named... error then a
      library the code depends on is not installed. Check the tutorial/guide or
      README to ensure you have installed the necessary libraries. Usually the
      missing library can be installed with the pip tool, but check the tutorial/guide
      for the exact command.

    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and power in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.

    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): INSERT PLATFORM/OPERATING
    SYSTEM HERE

  • Python version (run python -version or python3 -version): INSERT PYTHON
    VERSION HERE

  • Error message you are receiving, including any Python exception traces: INSERT
    ERROR MESAGE/EXCEPTION TRACES HERE
    *

  • List the steps to reproduce the problem below (if possible attach code or commands
    to run): LIST REPRO STEPS BELOW

No full on & full off mode?

One of often used features of PCA9685 IC is full on and full off mode of its outputs (bit 4 of LEDn_ON_H and bit 4 of LEDn_OFF_H registers). The library should allow using all features of the IC.

ls

Thank you for opening an issue on an Adafruit Python library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Python/Raspberry Pi projects check these very common issues to ensure they don't apply:

    • If you are receiving an ImportError: No module named... error then a
      library the code depends on is not installed. Check the tutorial/guide or
      README to ensure you have installed the necessary libraries. Usually the
      missing library can be installed with the pip tool, but check the tutorial/guide
      for the exact command.

    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and power in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.

    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): INSERT PLATFORM/OPERATING
    SYSTEM HERE

  • Python version (run python -version or python3 -version): INSERT PYTHON
    VERSION HERE

  • Error message you are receiving, including any Python exception traces: INSERT
    ERROR MESAGE/EXCEPTION TRACES HERE
    *

  • List the steps to reproduce the problem below (if possible attach code or commands
    to run): LIST REPRO STEPS BELOW

Relies on deprecated Adafruit_GPIO.Platform for RPI4 support

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.):

Hardware : BCM2711
Revision : d03114
Serial : 1000000098966e85
Model : Raspberry Pi 4 Model B Rev 1.4

'Linux-5.10.52-1-ARCH-armv7l-with-glibc2.32'

  • Python version (run python -version or python3 -version):

Python 3.9.6

  • Error message you are receiving, including any Python exception traces:

pwm = Adafruit_PCA9685.PCA9685()
File "/usr/lib/python3.9/site-packages/Adafruit_PCA9685/PCA9685.py", line 74, in init
self._device = i2c.get_i2c_device(address, **kwargs)
File "/usr/lib/python3.9/site-packages/Adafruit_GPIO/I2C.py", line 63, in get_i2c_device
busnum = get_default_bus()
File "/usr/lib/python3.9/site-packages/Adafruit_GPIO/I2C.py", line 55, in get_default_bus
raise RuntimeError('Could not determine default I2C bus for platform.')


- List the steps to reproduce the problem below (if possible attach code or commands
  to run): 

Create a pwm PCA9685 device on a Raspberry Pi 4.

PCA9685 -> gets the i2c device 
I2C.py -> gets_default_bus device (if not specified) via Platform.py
Platform.py -> case matches /proc/cpuinfo to RPI platforms but does not include BCM2711 as a match case

Adafruit_GPIO is deprecated so I presume you are no longer accepting pull requests to update the platform identification to support the RPI4.  Will the PCA9685 library be rewritten to leverage the replacement of the GPIO library?

I can't get the drivers to install on my Raspberry Pi. If I use pip install I get:

Thank you for opening an issue on an Adafruit Python library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.
  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.
  • For Python/Raspberry Pi projects check these very common issues to ensure they don't apply:
    • If you are receiving an ImportError: No module named... error then a
      library the code depends on is not installed. Check the tutorial/guide or
      README to ensure you have installed the necessary libraries. Usually the
      missing library can be installed with the pip tool, but check the tutorial/guide
      for the exact command.
    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and power in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.
    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): INSERT PLATFORM/OPERATING
    SYSTEM HERE
  • Python version (run python -version or python3 -version): INSERT PYTHON
    VERSION HERE
  • Error message you are receiving, including any Python exception traces: INSERT
    ERROR MESAGE/EXCEPTION TRACES HERE
    *
  • List the steps to reproduce the problem below (if possible attach code or commands
    to run): LIST REPRO STEPS BELOW

Issues communicating via I2C: BBB --> PCA9685

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): Linux beaglebone 4.14.71-ti-r80

  • Python version (run python -version or python3 -version): Python 2.7.13

  • Error message you are receiving, including any Python exception traces:
    Traceback (most recent call last):
    File "/var/lib/cloud9/Adafruit_Python_PCA9685/examples/simpletest.py", line 17, in
    pwm = Adafruit_PCA9685.PCA9685()
    File "/usr/local/lib/python2.7/dist-packages/Adafruit_PCA9685-1.0.1-py2.7.egg/Adafruit_PCA9685/PCA9685.py", line 75, in init
    self.set_all_pwm(0, 0)
    File "/usr/local/lib/python2.7/dist-packages/Adafruit_PCA9685-1.0.1-py2.7.egg/Adafruit_PCA9685/PCA9685.py", line 111, in set_all_pwm
    self._device.write8(ALL_LED_ON_L, on & 0xFF)
    File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 116, in write8
    File "build/bdist.linux-armv7l/egg/Adafruit_PureIO/smbus.py", line 256, in write_byte_data
    IOError: [Errno 16] Device or resource busy

  • List the steps to reproduce the problem below (if possible attach code or commands
    to run):
    Using BBB channel I2C-2 (P9_19 & P9_20), attach I2C connections to PCA9685 development board.
    Using Adafruit_Python_PCA9685 library, run example program: simpletest.py

importerror no module named 'adafruit pca9685

i am using putty and remote desktop to connect to raspberry pi
when i run program with Adafruit_PCA9685 in putty command line that uses python 2.7 it runs the program but when when i use python 3.5.3 shell it gives import error
i did every thing this conversation says
but
SAME ERROR
"importerror no module named 'adafruit pca9685'"

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.