Skip to main content

Library to control an ST7735 168x80 TFT LCD display.

Project description

Python ST7735

Build Status Coverage Status PyPi Package Python Versions

Python library to control an ST7735 TFT LCD display. Allows simple drawing on the display without installing a kernel module.

Designed specifically to work with a ST7735 based 160x80 pixel TFT SPI display. (Specifically the 0.96" SPI LCD from Pimoroni).

Installing

Python 2

Make sure you have the following dependencies:

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

Install this library by running:

sudo pip install st7735

Python 3

Make sure you have the following dependencies:

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

Install this library by running:

sudo python3 -m pip install st7735

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.

It has been modified by Pimoroni to include support for their 160x80 SPI LCD breakout, and hopefully also generalised enough so that it will support other ST7735-powered displays.

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

Changelog

0.0.5

  • Add support for choosing between BGR/RGB displays
  • Add methods for display power and sleep control

0.0.4-post1

  • Repackage with Markdown README/setup.cfg
  • Fix __version__ to 0.0.4
  • Update dependencies in README

0.0.4

  • Depend upon spidev==3.4.0 for stability fixes
  • Switch from manual data chunking to spidev.xfer3()

0.0.3

  • Fixed backlight pin
  • Added set_backlight
  • Added constants BG_SPI_CS_FRONT and BG_SPI_CS_BACK
  • Added module __version__

0.0.2

  • Support for multiple display sizes/orientations

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

ST7735-0.0.5.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

ST7735-0.0.5-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file ST7735-0.0.5.tar.gz.

File metadata

  • Download URL: ST7735-0.0.5.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for ST7735-0.0.5.tar.gz
Algorithm Hash digest
SHA256 7a06c281b03729fdbb2becc1e9d591e2711ef1e9a631ecdd109c5493f465f354
MD5 763943d9d91dd7fc0a2baf1ef7933bfa
BLAKE2b-256 385202f1b24507d7049ac46da90618a6781612dd9ff4ffd1b9c4e8c1c2bc3d2d

See more details on using hashes here.

File details

Details for the file ST7735-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: ST7735-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for ST7735-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d801b598e07cbfeb259c9184266fcdbbddbd1d3dd02b9b7b00fe7a07d811f1f7
MD5 25db3d6b57edbcab48e8d649209ed445
BLAKE2b-256 bf47d430e0c28824c2ddde2c87ca8e5aae1f6d211660942158bb4a2a34a9113e

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