Automation hat mini documentation

Hi-

Pins for the mini can be found here:

I’ve found the best support for programming the mini’s display via the examples:

If you want to look under the hood, the display uses an ST7735 controller. The python module for this is pretty thin, but has some great comments:

There’s not much to programming the display. You create an image with the PIL module (the st7735 module expects a PIL image) then you call the st7735.display() function with it.

The PIL image can be pretty much in any format since the st7735.display() function will convert it.

# setup st7735 spi interface
import ST7735 as ST7735
disp = ST7735.ST7735(
    port=0,
    cs=ST7735.BG_SPI_CS_FRONT,
    dc=9,
    backlight=25,
    rotation=270,
    spi_speed_hz=4000000
)
disp.begin()

# build an image
from PIL import Image, ImageDraw, ImageFont

my_font = ImageFont.load_default()
my_img = Image.new('RGB', (160, 80))
my_img_draw = ImageDraw.Draw(my_img)
text = 'Hello world!'
my_img_draw.text((0, 0), text, (255,255,255), font=my_font)

# display it
disp.display(my_img)

HTH.
-Pach