Can't get 0.96" LCD SPI to work

Hi,

I’ve recently bought a Raspberry Pi4b (running latest Raspberry OS), a breakout garden and the 0.96" LCD SPI display.

Everything appears be plugged and the display comes on however first time when I ran the code (after installing the drivers as per the website) I received the error gpiodevicemodule missing so I installed that and now I get the error:

Woah there, suitable gpiochip not found!
x PIN21: not found - /dev/gpiochip0 (pinctrl-bcm2711)!
x PIN21: not found - /de/gpiochip1 (raspberry-exp-gpio)!

process ended with exit code 1

I have the the BME688 module installed and that is working fine (Though the temperature is way out at the moment)

Kind regards,

Matthew

Did you install Bookworm? If yes I’d try installing Legacy and see what happens.

Don’t worry about that - you are running the temperature sensor directly above a heater.

Thank you, I wondered if that was the case.

Kind regards,

Matthew

Hi,

Yes, I was using Bookworm. I’ve just installed Legacy and the same problem happens.

Kind Regards,

Matthew

Ok, I figured it was worth a shot. The Pi 5 has the new RP1 chip on it, that does a lot of the GPIO stuff. I was thinking a change made in bookworm (even though its a Pi 4) might be messing with you.

I have two of the 1.54" SPI Colour Square LCD (240x240) Breakouts in use on my Pi 400 which is running Legacy 64 bit. I’m not sure how long ago I did my last reinstall on that was? I’m pretty sure it was no more than 3 months ago.

I have 3 of the 0.96" version your using in use on a Pi Zero. Not sure what version of Pi OS is installed though? I haven’t touched it in over a year, might be 2 or 3 years since I set it up?

Thank you, I’ve also emailed support so I’ll see if they come back.

Kind regards,

Matthew

Hi,

I think I have found the source of the problem, in the example code there is a line that says:

dc=“PIN21”, # “GPIO9” / “PIN21”. “PIN21” for a Pi 5 with Enviro Plus

I’m running it on a Raspberry Pi4b so I think just need to find out what pin I need to change this to.

Kind regards,

Matthew

Solved it it should read dc=“GPIO9”

also have the temperature working now by install a right angle GPIO extender and plugging the breakout garden into that.

Kind Regards,

Matthew

I wouldn’t have thought it matters Pi 4 or Pi 5? The pinout for the 40 pin GPIO header has always been the same. And the hat uses specific pins regardless. It’s hard wired as per the schematic.
breakout_hat_spi.sch (shopify.com)
That being said. What slot you use on the hat for SPI, front or back, affects what CE pin you need to use in your code. Back is CE0 and front is CE1. I should have mentioned that earlier in this thread, sorry about that.

SPI0 is as follows
GPIO 7, Pin 26, CE1
GPIO 8, Pin 24, CE0
GPIO 9, Pin 21, MISO (DC)
GPIO 10, Pin 19, MOSI
GPIO 11, Pin 23, SCLK

Interesting, thank you, still very new to this so this is really good, thank you again.

Kind regards,

Matthew