Library to control ST7789 TFT LCD displays on the Orange Pi.
Project description
Python ST7789 for OrangePi
Python library to control ST7789 TFT LCD displays on the Orange Pi.
Designed to work with the following ST7789 based SPI breakouts and Orange Pi Extension:
Installation
First, make sure you have the following dependencies:
sudo apt update
sudo apt install python3-spidev python3-pip python3-pil
Install this library by running:
sudo pip3 install OrangePi.ST7789
You will also need to make sure SPI is enabled in armbian-config (sudo armbian-config
) - you can find them under Interface Options.
Examples
You can find some examples of use in the examples folder. Clone this repo with:
git clone https://github.com/sonocotta/st7789-orangepi-python
and navigate into the examples folder with:
cd ~/st7789-orangepi-python/library/examples/
You can pass most of them a parameter (square
, rect
, round
, or dhmini
) to specify the size/shape/rotation of screen, like this:
python3 shapes.py dhmini
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 withOPi.GPIO
andspidev
to closely align with our other software (IE: Orange Pi only)
Modified from 'Adafruit Python ILI9341' written by Tony DiCola for Adafruit Industries.
MIT license, all text above must be included in any redistribution
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
File details
Details for the file OrangePi.ST7789-1.1.1.tar.gz
.
File metadata
- Download URL: OrangePi.ST7789-1.1.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d812bb6a56b1191751938de80497bc7d5eeab92c265e84bf4f8a33ff27535f90 |
|
MD5 | 314705e553f38b9a6a54346cc93ae16c |
|
BLAKE2b-256 | d5b42bcf2eaab0e05868939f6a364034675f6e0af60d9a2d9ebf141a410e9e55 |