I 've loaded the drivers web page Adafruit.ADAFRUIT_PCA9685
CODE installed on raspberry pi 4. sudo spt-get install git cd
git clone https:// github.com /cd Adafruit_python_PCA9685
sudo python setup.py install
I couldn’t give all the code at the top as its covered by the copy button .
When I run the simpletest.py thats cd into ADAFRUIT_PCA9685 pyhon simpletest.py
I get returned no module name Adafruit_GPIO ?
This is from MAKE TUTOR YOUTUBE it works in her video
Anyone help please
This is to run the Pca9685 with raspberry pi r4 to run 4 servo motors or more
To get started, I have found a source of many Pi issues comes done to an OS mismatch so if you could share what version you are running that would also be appreciated.
We’re happy to help but need some more info to do so.
What does this mean ??
The GitHub page or the Video.
Note: Since the video was made the Library has been deprecated by Adafruit.
Possibly the Adafruit_GPIO module no longer exists. You would have to check the script output from sudo python setup.py install
This highlights the problem of making a video and then the manufacture or software developer changes things.
All YouTube how to videos should be viewed as information only, not a definitive how to.
Is it necessary to use a Pi 4 ??
Adafruit have gone the Circuit Python way, maybe a Pico or other RP2040 devices might work just as good.
Cheers
Jim
EDIT: As a side note rant, I hate the way YouTube now makes me watch ads that never seem to stop.
I know a way around it, but it is very annoying compared to how YouTube used to work.
Ran through the GitHub install instructions on Pi 4B. git clone https://github.com/adafruit/Adafruit_Python_PCA9685.git
Did not look the same as the video.
There were missing files in folder compared with the video.
sudo python setup.py install
Did not work either, said ‘file is not a zipfile’.
Tried sudo pip install adafruit-pca9685 as suggested by the GitHub page.
This seemed to work ok and one of the installs was Adafruit-GPIO.
You could try contacting Adafruit, probably they will say it is ‘deprecated’ and no longer supported.
No idea if this is what you experienced or if pip will work for you.
The problems I experienced could be due to the version of Pi OS.
But overall it is not looking good.
Regards
Jim
EDIT: Had another go with a clean install of latest Pi OS, didn’t get much further.
The script messages say it is ‘deprecated’ and to use Build and PIP and other standard based tools.
Considering the GitHub library is 7 years old, was deprecated 2 years ago and the video is 3 years old.
I would give up on trying to get this to work, there will be no support for it.
The PCA9685 is an I2C interface so other libraries on GitHub should work.
There is nothing special about the Adafruit board that you have to use their software.
There are other versions of the board, much cheaper than Adafruit.
You will need Bullseye installed on the Pi, Bookworm did not work.
From GitHub:
To install system-wide (this may be required in some cases):
sudo pip3 install adafruit-circuitpython-pca9685
Check the last message from the script says Successfully installed Adafruit-Blinka … and other packages.
When I ran the example sudo python3 pca9685_simpletest.py
it replied with No I2C device at address: 0x40.
Which is expected as I don’t have a PCA9685 board.
Thats about the closest I can get it to running.
Cheers
Jim
EDIT: The no device message occurred at Line 17 of the python script. pca = PCA9685(i2c_bus)
which means all the imports worked and is the first point in the script where it wants to talk to the board.
Unfortunately it will be developers like Core with PiicoDev that will adapt.
The GitHub page Python on Raspberry Pi details the changes with Bookworm and Python.
Therefore from Bookworm onwards, packages installed via pip must be installed into a Python virtual environment using venv . A virtual environment is a container where you can safely install third-party modules so they won’t interfere with, or break, your system Python.
Probably will make for more stable environments. In the past; if something screws up with my project, I have found it easier to just load a new Pi OS and start again. Maybe virtual environments will solve this.
But it is a massive change and will be hard to deal with.
Bookworm will get blamed when its the Python community that has initiated it.
This has been introduced by the Python community, not Raspberry Pi
Regards
Jim
EDIT: I ran through the process using a virtual python environment in Bookworm. So far all good and not too hard to setup.
Adafruit PCA9685 libraries installed ok using pip3.
Thonny is pretty easy to setup to access this virtual environment too. Thonny remembers the virtual environment on next boot. I could also install the PiicoDev libraries from Thonny.
If using the command line you just need to activate the environment first.