The error message, "Woah there, some pins we need are in use! Chip Select: (line 8, SPI_CE0_N) currently claimed by spi0 CS0"appears even when using a Pi zero W or a pi 3B.
I have tried using the following curl https://get.pimoroni.com/inky | bash
I have also tried git clone GitHub - pimoroni/inky: Combined library for V2/V3 Inky pHAT and Inky wHAT.. Both methods result in the above error message. Can anyone point me in the right direction to resolve this issue.
I got more or less the same message, except Chip Select: (line 8, GPIO8) currently claimed by spi0 CS0".
I’m running it on a Raspberry Pi Zero 2 w, with all the recent updates installed.
Because this error mentions the SPI interface, I tried disabling it. After this my Python code gets this error:
Traceback (most recent call last):
File "/home/inkyfour/PythonProjects/splitinkdemo/src/splitinkdemo/splitinkdemo_inky.py", line 144, in <module>
main()
File "/home/inkyfour/PythonProjects/splitinkdemo/src/splitinkdemo/splitinkdemo_inky.py", line 139, in main
INKY_DISPLAY.show()
File "/home/inkyfour/.cache/pypoetry/virtualenvs/splitinkdemo-J2ddlgWq-py3.11/lib/python3.11/site-packages/inky/inky_ac073tc1a.py", line 361, in show
self._update(buf.astype("uint8").tolist())
File "/home/inkyfour/.cache/pypoetry/virtualenvs/splitinkdemo-J2ddlgWq-py3.11/lib/python3.11/site-packages/inky/inky_ac073tc1a.py", line 307, in _update
self.setup()
File "/home/inkyfour/.cache/pypoetry/virtualenvs/splitinkdemo-J2ddlgWq-py3.11/lib/python3.11/site-packages/inky/inky_ac073tc1a.py", line 220, in setup
self._spi_bus.open(0, self.cs_channel)
FileNotFoundError: [Errno 2] No such file or directory
I think I have another unpatched Raspberry Pi Zero 2 hanging around I’ll see if that works better.
Check out this issue - you might need add this line to your boot/firmware/config.txt:
dtoverlay=spi0-0cs
I saw that 2.0.0 of the inky[rpi] package had this change note:
- Rewrite to gpiod/gpiodevice.
I’ve downgraded the inky[rpi] package to 1.5.0 and now my Python code works.
Hurray! At least there’s one way it works.
Next I’ve changed /boot/firmware/config.txt as you suggested. And rebooted.
And now my Raspberry Pi Zero 2 doesn’t go to the desktop. It keeps showing a black screen with seemingly a prompt (or underscore), but no interaction is possible.
Luckily I was able to roll back this change via ssh.
Thanks for the replies to my email regarding the issues I am having with
the above Inky.
I have tried the remedies suggested by as yet with no success. If i try
the latest Raspberry OS (bookworm) it requires me to set up a venv as it
states that I am trying to install a Non Debian python package (using
the following method - curl https://get.pimoroni.com/inky | bash) or the
other method - git clone GitHub - pimoroni/inky: Combined library for V2/V3 Inky pHAT and Inky wHAT.).
Is there a documented tutorial as to setting up the “inky impression
7.3” which might help me overcome the issues I am having, in particular
the best OS for a Pi Zero W and a Pi 3B. Any help would be much appreciated.
Thanks
M.L.Kalbabka
I can give you the exact commands I’ve used on my Raspberry Pi Zero 2. For this I use poetry to setup the virtual environment.
sudo apt install pipx
pipx ensurepath
At this point log in again so poetry will find the path.
pipx install poetry
poetry config virtualenvs.in-project true
mkdir PythonProjects
cd PythonProjects
poetry new --src inkydemo
cd inkydemo
poetry install
Now add the packages needed:
poetry add Pillow
poetry add inky[rpi]==1.5.0
Next prepare a simple image of 800x480 pixels.
I didn’t test this code, but it should be possible to load that image something like this:
from inky.inky_uc8159 import Inky
from inky.auto import auto
from itertools import product
from PIL import Image
# Inky display settings
INKY_DISPLAY = auto()
INKY_DISPLAY.set_border(INKY_DISPLAY.BLACK)
DISPLAY_WIDTH = INKY_DISPLAY.WIDTH
DISPLAY_HEIGHT = INKY_DISPLAY.HEIGHT
image_name = 'image_800_480.jpg'
image_open = Image.open(image_name)
INKY_DISPLAY.set_image(tile_image)
INKY_DISPLAY.show()
Many thanks for your response and the follow-up advice. I have tried all that you suggested and various suggestions from AI and am still unable to get the Inky Impression to work.
I get a variety of error messages such as “Protocol issues” and certain libaries not installing correctly.
I have shelved this project for the time being as other things need my attention, but will come back to it in the future.
I am getting the exact same error with my brand new setup. Has anyone found a resolution?