Skip to main content

Driver for ST7789-based TFT LCD displays.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

st7789-1.0.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

st7789-1.0.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file st7789-1.0.0.tar.gz.

File metadata

  • Download URL: st7789-1.0.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for st7789-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e1750939081bcf20e7276586bf338465482b529fd45bb4d51d1d12a1c6f67921
MD5 aa3697e754d63f52801c4de7ba9fd2c9
BLAKE2b-256 54e0d9b2bddccaa1613deaf9c8af34306546fd19ed7e9b3113e0ff18235e58f1

See more details on using hashes here.

File details

Details for the file st7789-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: st7789-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for st7789-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afa272272374ecf44ca9cce7af5888133ad7ccab979175a4bdfcd13ee1482572
MD5 49cb24b1f29d450f1de0ee8ff39d1d38
BLAKE2b-256 840b0f7b9dd2f6025a20dc0419bdac658542f68d2300f9ce5f171dbfc778709d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page