pimoroni / inky

Combined library for V2/V3 Inky pHAT and Inky wHAT.
https://shop.pimoroni.com/?q=inky
MIT License
590 stars 122 forks source link

"pins we need are in use" error when attempting to draw image to Inky Impressions 7.3" #202

Closed FoxtrotPerry closed 1 month ago

FoxtrotPerry commented 1 month ago

Issue Description

I bumped my project to inky 2.0.0 and added gpiod and gpiodevice to the pyproject.toml and encountered the following output:

Detected 7-Colour 800x480 (AC073TC1A)
Woah there, some pins we need are in use!
  ⚠️   Chip Select: (line 8, GPIO8) currently claimed by spi0 CS0

Configuration Context

FoxtrotPerry commented 1 month ago

Was able to find that the error is coming from gpiodevice. I'm not familiar enough with raspberry pi architecture to know if is happening because I'm using a pi 3 instead of a 5. Judging by the code though, it seems like gpiodevice at least found a suitable gpiod chip on the pi 3.

Gadgetoid commented 1 month ago

We probably need some better documentation around this, but since pins are now exclusive but Inky wants to control SPI chip select from software you might need to add the following to config.txt:

dtoverlay=spi0-0cs

crogers3 commented 1 month ago

I'm running into the same issue after upgrading to inky 2.0.0 on a Raspberry Pi Zero W. After setting the config option above, I'm encountering a different but similar error:

Chip Select: (line 8, SPI_CE0_N) currently claimed by spi-bcm2835
FoxtrotPerry commented 1 month ago

I'm trying the suggested fix right now as well and will report back with whether it worked for me or not!

FoxtrotPerry commented 1 month ago

Issue was resolved after adding dtoverlay=spi0-0cs to my /boot/firmware/config.txt as @Gadgetoid suggested! For those who might come across this issue in the future - my pi's config.txt was completely stock aside from a couple of unrelated HDMI entries.