# Automation Hat Mini Display RPi 5

**URL:** <https://forums.pimoroni.com/t/automation-hat-mini-display-rpi-5/29105>\
**Category:** Raspberry Pi\
**Created:** [September 24, 2026, 11:55am UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-rpi-5/29105 "2026-09-24T11:55:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![torhans](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@torhans](https://forums.pimoroni.com/u/torhans)\
**Post date:** [September 24, 2026, 11:55am UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-rpi-5/29105/1 "2026-09-24T11:55:04Z")

</div>

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?

Thanks  
Torben

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [September 24, 2026, 9:50pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-rpi-5/29105/2 "2026-09-24T21:50:59Z")

</div>

This might help.

```auto
# Create ST7735 LCD display class.
disp = st7735.ST7735(
    port=0,
    cs=st7735.BG_SPI_CS_FRONT,
    dc=9,
    backlight=25,
    rotation=270,
    spi_speed_hz=4000000
)

# Initialize display.
disp.begin()

```

from here,

> <https://github.com/pimoroni/automation-hat/blob/main/examples/hat-mini/output.py>

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. ;)

---

<div class="post-metadata">

**Author:** ![torhans](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@torhans](https://forums.pimoroni.com/u/torhans)\
**Post date:** [September 25, 2026, 11:50am UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-rpi-5/29105/3 "2026-09-25T11:50:22Z")

</div>

Thanks

I started by just running the analog.py example, so it is not a simple typo.

I can add that I get this in dmesg

```auto
[50.803510] pinctrl-rp1 1f000d0000.gpio: pin gpio9 already requested by 1f00050000.spi; cannot claim for pinctrl-rp1:578
[50.803522] pinctrl-rp1 1f000d0000.gpio: error -EINVAL: pin-9 (pinctrl-rp1:578)

```

1f00050000.spi seems to be the EEPROM.  
I have updated all installed packages.  
I have tried to uninstall “rpi-eeprom”

Thanks

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [September 25, 2026, 2:14pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-rpi-5/29105/4 "2026-09-25T14:14:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [September 25, 2026, 10:11pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-rpi-5/29105/5 "2026-09-25T22:11:44Z")

</div>

This site can come in handy.

> **[Raspberry Pi GPIO Pinout](https://pinout.xyz/)**
>
> The comprehensive add-on boards & GPIO Pinout guide for the Raspberry Pi

You can select spi etc and see what pins are used.

> **[SPI at Raspberry Pi GPIO Pinout](https://pinout.xyz/pinout/spi)**
>
> Raspberry Pi SPI pins

And even get pinouts for hats etc.

> **[Automation HAT Mini at Raspberry Pi GPIO Pinout](https://pinout.xyz/pinout/automation_hat_mini)**
>
> An all-in-one home automation and control board with colour LCD

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.

```auto
SPI0 
GPIO 7, Pin 26, CE1
GPIO 8, Pin 24, CE0
GPIO 9, Pin 21, MISO
GPIO 10, Pin 19, MOSI
GPIO 11, Pin 23, SCLK

SPI1
GPIO 16, Pin 36, CE2
GPIO 17, Pin 11, CE1
GPIO 18, Pin 12, CE0
GPIO 19, Pin 35, MISO
GPIO 20, Pin 38, MOSI
GPIO 21, Pin 40, SCLK

/boot/config.txt

dtparam=spi=on

dtoverlay=spi1-1cs #1 chip select
dtoverlay=spi1-2cs #2 chip select
dtoverlay=spi1-3cs #3 chip select

SCLK - Serial CLocK
CE - Chip Enable (often called Chip Select)
MOSI - Master Out Slave In
MISO - Master In Slave Out
MOMI - Master Out Master In

```

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [September 25, 2026, 10:20pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-rpi-5/29105/6 "2026-09-25T22:20:24Z")

</div>

I think this might be the thread with the answer?

> [@Pi Zero + enviro+ + pms5003 = pin error](https://forums.pimoroni.com/t/pi-zero-enviro-pms5003-pin-error/23520/4):
>
> I have posted an update in [Issue with Enviro+ with RPi Zero: Display and particles not working - Support - Pimoroni Buccaneers](https://forums.pimoroni.com/t/issue-with-enviro-with-rpi-zero-display-and-particles-not-working/23365/13) that may resolve this problem.

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [September 26, 2026, 7:56am UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-rpi-5/29105/7 "2026-09-26T07:56:07Z")

</div>

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).
