Skip to main content

Python ST7789

Build Status Coverage Status PyPi Package Python Versions

Python library to control an ST7789 TFT LCD display

Designed specifically to work with a ST7789 based 240x240 pixel TFT SPI display. (Specifically the 1.3" SPI LCD from Pimoroni).

Animated GIF showing the ST7789 SPI LCD displaying Deploy/Rainbows in alternating frames

Installation

Make sure you have the following dependencies:

sudo apt-get update
sudo apt-get install python-rpi.gpio python-spidev python-pip python-pil python-numpy

Install this library by running:

sudo pip install st7789

You might also need to enable I2C and SPI in raspi-config. See example of usage in the examples folder.

Licensing & History

This library is a modification of a modification of code originally written by Tony DiCola for Adafruit Industries, and modified to work with the ST7735 by Clement Skau.

To create this ST7789 driver, it has been hard-forked from st7735-python which was originally modified by Pimoroni to include support for their 160x80 SPI LCD breakout.

Modifications include:

  • PIL/Pillow has been removed from the underlying display driver to separate concerns- you should create your own PIL image and display it using display(image)
  • width, height, rotation, invert, offset_left and offset_top parameters can be passed into __init__ for alternate displays
  • Adafruit_GPIO has been replaced with RPi.GPIO and spidev to closely align with our other software (IE: Raspberry Pi only)
  • Test fixtures have been added to keep this library stable

Pimoroni invests time and resources forking and modifying this open source code, please support Pimoroni and open-source software by purchasing products from us, too!

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Modified from 'Modified from 'Adafruit Python ILI9341' written by Tony DiCola for Adafruit Industries.' written by Clement Skau.

MIT license, all text above must be included in any redistribution

1.0.1

  • Add spidev and numpy dependencies.

1.0.0

  • Repackage to hatch/pyproject.toml
  • Port to gpiod/gpiodevice

0.0.4

  • Add support for 320x240 2.0" LCD (Display HAT Mini)
  • Add support for 240x135 1.14" LCD (@slabua)
  • Rework numpy RGB888 to RGB565
  • Support displaying numpy arrays (@zecktos)

0.0.3

  • Add support for RLCD
  • Brought back offset_left and offset_top parameters

0.0.2

  • Fix for image retention
  • Drop defunct parameters

0.0.1

  • Initial Release

Release files for st7789 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for st7789 1.0.1
File Size Uploaded
st7789-1.0.1.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for st7789 1.0.1
File Interpreter ABI Platform
st7789-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / st7789-1.0.1.tar.gz

Download URL st7789-1.0.1.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
f204983d19d35e26650455ac7e29bd7b26d422d470f093994403f6df8ecddc1b
BLAKE2b-256 checksum
How to use checksums
7120ed062044f737a8fe2aaef7815584a690c24d6af9a1385c0c9cd1298f5cf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.2

Release files / st7789-1.0.1-py3-none-any.whl

Download URL st7789-1.0.1-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
816ee227984b2f5b4647f7c4ab241c57b495d1502e27a8127f27388d5e8f861f
BLAKE2b-256 checksum
How to use checksums
e3dd4fe563f2a757425a3460eee92f9a19ba893ed90f9d85f1be3d7dc91df305
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.0.4

2 release files

0.0.3

3 release files

0.0.2

3 release files

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page