Automation HAT Mini : Display issue

Hello folks!

Just installed the Automation HAT library from the link on the product page.

I’m trying to use the display, but the examples in the package appear to be for the older Automation HAT. I spotted that @gadgetoid has added a hat-mini folder to the Github Repo, so I downloaded and tested output.py. It produces an error as module ST7735 is missing.

Is the package on pip out of date? Or is there something I’ve not twigged?

Any suggestions much appreciated!

Good evening.

Have you ever resolved this problem ?
I find myself in the same situation.

I try to install automation hat mini on a raspberry pi zero with buster light.

The procedure on the site installs a working system for the “normal” hat and for the phat.
Not for the mini apparently.

Have a nice day.

Guibert

Hello ,
I have a solution to our problem,
After loading the automationhat library
I have, as you , all right but exept screen.
To solve, i have loaded enviroplus-python library.

curl -sSL https://get.pimoroni.com/enviroplus | bash

See https://github.com/pimoroni/enviroplus-python

After reboot
Examples in hat-mini are ok
And example lcd.py works perfectly with automationhat
I hope will be for you the same
Great

1 Like

Hi Guys, I have followed your advice, but only after I tried installing other ST7735 libraries. Now when running any of the hat-mini scripts I get the same error:
python /home/pi/Pimoroni/automationhat/examples/hat-mini/output.py
output.py

This Automation HAT Mini example toggles and displays the
status of the three 24V-tolerant digital outputs.

Press CTRL+C to exit.

Traceback (most recent call last):

  • File “/home/pi/Pimoroni/automationhat/examples/hat-mini/output.py”, line 48, in *
  • cs=ST7735.BG_SPI_CS_FRONT,*
    AttributeError: ‘module’ object has no attribute ‘BG_SPI_CS_FRONT’

Anyone know why this is happening?
Thanks!

Yeah incase anyone is interested, I fixed this by clean installing a new Raspbian image and then loaded the enviroplus-python library first like @Heride mentioned above. Thanks for that

As is usual with anything linux, it still didn’t work straight away and I got error messages when trying to run any of the hat-mini python scripts. The images could not be found but I then fixed this by adding the full path to the text and not just “/images/xxx123.jpg” .

I am glad that it now works (I still have an issue when running the analog.py script - Line 71 - most likely to do with a missing font, but I can’t be bothered to fix that now. I just remmed it out until I have the strenght to tackle this again).

I am just a bit let down that the Pimoroni crew expects everyone to know how to fix these issues and it is kind of a barrier to entry for newbies like myself. Also, no one from Pimoroni officially responded to this thread. I just feel like they bring out such innovative and fun products, but once you buy it you are on your own.

Anyway, I hope my fix helps someone else get joy out of their Automation hat mini

Thanks, You’re the best!

I loaded the envioplus-python library, reboot and got the same ST7735 FileNotFoundError

I think it is frustrating, Pimoroni people did not solve the error after more than a year

I think it is also needed to enable SPI for the display:

… Enable SPI: raspi-config nonint do_spi 0

There is a “contact our support team” link on the main shop page.
Contact Us for Raspberry Pi Technical Support - Pimoroni

I use that display a lot, and run Enviro etc code on it. I do the stand alone install from here.

sudo python3 -m pip install st7735

For the automation hat mini it should be something like this. Although, the examples “should” work without having to edit them. I run custom double and sometimes triple display setups so I end up editing that section of code most times anyway.

disp = ST7735.ST7735(
    port=0,
    cs=1, 
    dc=9,
    backlight=25, 
    rotation=90,
    spi_speed_hz=10000000
)
1 Like

Any hints about using the display on a RPi 400 with Bullseye?
I have one regular-sized hat and two minis. Everything works fine except for both Mini displays.
I can see the backlights turn on when I run the latest examples from GitHub, but nothing is shown on them.
SPI and I2C are both enabled.
Edit: The displays work fine on a RPi 3B.

You can’t use two mini’s on the same pi. The displays will both be using the same chip sellect. They need to each be using a different chip sellect tobe used independently.

I’m not trying to use them at the same time. I know how I2C and SPI work. I was just trying to show that it probably is not just one broken hat.

Ah, ok I misunderstood your post.