Open breaker-of-stone opened 3 weeks ago
Hello, thanks for the report. It's been a while since I last tried on a Raspberry Pi 5, but it worked at the time. I suspect a chance in Adafruit's Blinka library, which is imported by apa102. Unfortunately I can't test for at least a week, so a resolution might take a while.
Thanks, would at least welcome verification.
Unfortunately I cannot reproduce the error. I have the same Pi 5 revision as you, and I have fully updated/upgraded the OS, and upgraded all Python packages. See the list below.
There is one difference in my setup: After installing apa102-pi, I uninstall it right away (I only want the required dependencies). Then, I use the cloned apa102-pi, and run e.g. ./runcolorcycle.py
. You seem to run e.g. .venv/lib/python3.11/site-packages/apa102_pi/driver/colorcycletemplate.py
, while I would run ./apa102_pi/driver/colorcycletemplate.py
. Could you try this as well?
Edit: I have this package installed by default via apt:
python3-rpi.gpio:
Installed: 0.7.1~a4-1+b4
lgpio was installed via Adafruit-Blinka
, I suspect. It's in the list below. It is not installed via apt
, on my system.
Package Version
---------------------------------------- --------
Adafruit-Blinka 8.47.0
adafruit-circuitpython-bitbangio 1.3.15
adafruit-circuitpython-busdevice 5.2.9
adafruit-circuitpython-connectionmanager 3.1.1
adafruit-circuitpython-requests 4.1.6
adafruit-circuitpython-typing 1.11.0
Adafruit-PlatformDetect 3.73.0
Adafruit-PureIO 1.1.11
binho-host-adapter 0.1.6
certifi 2024.7.4
chardet 5.2.0
charset-normalizer 3.3.2
colorzero 2.0
distro 1.9.0
gpiozero 2.0.1
idna 3.8
lgpio 0.2.2.0
pigpio 1.78
pip 24.2
pycryptodomex 3.20.0
pyftdi 0.55.4
pyserial 3.5
python-apt 2.6.0
pyusb 1.2.1
requests 2.32.3
RPi.GPIO 0.7.1
rpi-ws281x 5.0.0
setuptools 74.0.0
six 1.16.0
smbus2 0.4.3
spidev 3.6
ssh-import-id 5.11
sysv-ipc 1.1.0
toml 0.10.2
typing_extensions 4.12.2
urllib3 2.2.2
wheel 0.44.0
Previous work on an R.Pi.4 is throwing an error on the R.Pi.5.
I'm using apa102_pi and the demo script therein: https://github.com/tinue/apa102-pi/blob/main/runcolorcycle.py
and seeing a 'GPIO busy' exception. Configuration and exception dump follows. How to diagnose?
pinout
lsb_release -a
python --version
Python 3.11.2 # distro
venv is engagedPrior to this situation I encountered:
So chose to:
/boot/firmware/config.txt has:
Have enabled SPI in raspi-config for good measure.
pinctrl gives:
gpioinfo says:
Issue follows. Results are identical if running under sudo.
Counter-evidence: Another demo from the apa102_pi repo succeeds, has no errors: https://github.com/tinue/apa102-pi/blob/main/sample.py