# Automation HAT Mini : Display issue

**URL:** <https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391>\
**Category:** Support\
**Created:** [March 25, 2020, 11:35am UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391 "2020-03-25T11:35:21Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkeegan](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mkeegan](https://forums.pimoroni.com/u/mkeegan)\
**Post date:** [March 25, 2020, 11:35am UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/1 "2020-03-25T11:35:21Z")

</div>

Hello folks!

Just installed the [Automation HAT library](https://github.com/pimoroni/automation-hat) from the link on the [product page](https://shop.pimoroni.com/products/automation-hat-mini).

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!

---

<div class="post-metadata">

**Author:** ![Guibert](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Guibert](https://forums.pimoroni.com/u/Guibert)\
**Post date:** [May 1, 2020, 3:48pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/2 "2020-05-01T15:48:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Heride](https://avatars.discourse-cdn.com/v4/letter/h/f14d63/32.png) [@Heride](https://forums.pimoroni.com/u/Heride)\
**Post date:** [June 8, 2020, 5:29pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/3 "2020-06-08T17:29:45Z")

</div>

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.

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

```

See [https://github.com/pimoroni/enviroplus-python](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

---

<div class="post-metadata">

**Author:** ![Heride](https://avatars.discourse-cdn.com/v4/letter/h/f14d63/32.png) [@Heride](https://forums.pimoroni.com/u/Heride)\
**Post date:** [June 8, 2020, 5:32pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/4 "2020-06-08T17:32:33Z")

</div>

> **[pimoroni/enviroplus-python](https://github.com/pimoroni/enviroplus-python)**
>
> Python library for the Enviro+ environmental monitoring board - pimoroni/enviroplus-python

---

<div class="post-metadata">

**Author:** ![Laser128](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/laser128/32/7085_2.png) [@Laser128](https://forums.pimoroni.com/u/Laser128)\
**Post date:** [August 9, 2020, 9:15am UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/5 "2020-08-09T09:15:54Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Laser128](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/laser128/32/7085_2.png) [@Laser128](https://forums.pimoroni.com/u/Laser128)\
**Post date:** [August 21, 2020, 1:57pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/6 "2020-08-21T13:57:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![robert\_s](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/robert_s/32/7826_2.png) [@robert\_s](https://forums.pimoroni.com/u/robert_s)\
**Post date:** [April 26, 2021, 8:21am UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/7 "2021-04-26T08:21:35Z")

</div>

Thanks, You’re the best!

---

<div class="post-metadata">

**Author:** ![rbellas](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@rbellas](https://forums.pimoroni.com/u/rbellas)\
**Post date:** [April 9, 2022, 5:44pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/8 "2022-04-09T17:44:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rbellas](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@rbellas](https://forums.pimoroni.com/u/rbellas)\
**Post date:** [April 9, 2022, 5:51pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/9 "2022-04-09T17:51:22Z")

</div>

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

… Enable SPI: `raspi-config nonint do_spi 0`

---

<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:** [April 9, 2022, 6:33pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/10 "2022-04-09T18:33:38Z")

</div>

There is a “contact our support team” link on the main shop page.  
[Contact Us for Raspberry Pi Technical Support - Pimoroni](https://shop.pimoroni.com/pages/contact-us)

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

> **[GitHub - pimoroni/st7735-python: Python library to control an ST7735 TFT LCD...](https://github.com/pimoroni/st7735-python)**
>
> Python library to control an ST7735 TFT LCD display. Allows simple drawing on the display without installing a kernel module. - GitHub - pimoroni/st7735-python: Python library to control an ST7735...

```auto
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.

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

```

---

<div class="post-metadata">

**Author:** ![stellanl](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/stellanl/32/8821_2.png) [@stellanl](https://forums.pimoroni.com/u/stellanl)\
**Post date:** [June 7, 2022, 2:26pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/11 "2022-06-07T14:26:11Z")

</div>

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.

---

<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:** [June 7, 2022, 5:23pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/12 "2022-06-07T17:23:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![stellanl](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/stellanl/32/8821_2.png) [@stellanl](https://forums.pimoroni.com/u/stellanl)\
**Post date:** [June 7, 2022, 7:18pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/13 "2022-06-07T19:18:36Z")

</div>

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.

---

<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:** [June 7, 2022, 7:38pm UTC](https://forums.pimoroni.com/t/automation-hat-mini-display-issue/13391/14 "2022-06-07T19:38:13Z")

</div>

Ah, ok I misunderstood your post.
