Driver for ST7789-based TFT LCD displays.
Project description
Python ST7789
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).
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
andoffset_top
parameters can be passed into__init__
for alternate displaysAdafruit_GPIO
has been replaced withRPi.GPIO
andspidev
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
andoffset_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
Built Distribution
File details
Details for the file st7789-1.0.1.tar.gz
.
File metadata
- Download URL: st7789-1.0.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f204983d19d35e26650455ac7e29bd7b26d422d470f093994403f6df8ecddc1b |
|
MD5 | 0a6a6a5e22a393d26c3f72c0c35d0642 |
|
BLAKE2b-256 | 7120ed062044f737a8fe2aaef7815584a690c24d6af9a1385c0c9cd1298f5cf9 |
File details
Details for the file st7789-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: st7789-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 816ee227984b2f5b4647f7c4ab241c57b495d1502e27a8127f27388d5e8f861f |
|
MD5 | 71458376f01546165ec5f5c3330ea08e |
|
BLAKE2b-256 | e3dd4fe563f2a757425a3460eee92f9a19ba893ed90f9d85f1be3d7dc91df305 |