I have bought a Automation Hat Mini and attached it on a RPi 5.
Analog in works!
But, when I try to connect to the display using
disp = st7735.ST7735(port=0,cs=st7735.BG_SPI_CS_FRONT,dc=9,backlight=25,rotation=270,spi_speed_hz=4000000)
I get an
ValueError: (22, ‘Invalid argument’)
If I choose something else for dc (eg. 24) I do not get an error, but obviously it does not work.
I guess GPIO 9 is reserved for MISO!
Have anybody had success using the Automation Hat Mini on RPi 5?
EDIT: ops, maybe not? That looks like what your using? Assuming you have it entered correctly in your code. If you use the preformated text option, the </> button, it will retian your code formatting when you post it. It makes it easier to read. ;)
This sounds very familiar. I have a faint memory that in one of the posts here somebody described how to free the GPIO9 pin but I can’t find it now. It has to do with an overlay that claims the pin for SPI. Maybe check your config.txt.
You can select spi etc and see what pins are used.
And even get pinouts for hats etc.
I think I read that thread Bernhard mentioned. I can’t find it either. I don’t have that bit of hardware on hand to tinker with so I’ll tag along for now. I do have that display as a breakout and a breakout garden though, so I may yet try a few things. Probabaly tomorrow though.
EDIT Here is some info that I just remembered I had, might help.
Yes, this is it. Quoting it here in case somebody else is searching for it:
For anyone else hitting this later: the combo that worked was dtoverlay=spi0-2cs,no_miso in /boot/firmware/config.txt — frees GPIO9 from the SPI0 MISO alt-function (which gpiod/st7735 needs to claim as a DC pin) while keeping both chip-selects available (since the Enviro+ LCD is wired to CS1).