Skip to content

Commit 55cf6c3

Browse files
authored
Merge pull request #19 from helgibbons/master
Spruce up the readme
2 parents 04d5333 + 817b182 commit 55cf6c3

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,53 @@
66
[![Python Versions](https://img.shields.io/pypi/pyversions/st7789.svg)](https://pypi.python.org/pypi/st7789)
77

88

9-
Python library to control an ST7789 TFT LCD display
9+
Python library to control ST7789 TFT LCD displays.
1010

11-
Designed specifically to work with a ST7789 based 240x240 pixel TFT SPI display. (Specifically the [1.3" SPI LCD from Pimoroni](https://shop.pimoroni.com/products/1-3-spi-colour-lcd-240x240-breakout)).
11+
Designed to work with the following Pimoroni ST7789 based SPI breakouts and Raspberry Pi HATs:
1212

13-
![Animated GIF showing the ST7789 SPI LCD displaying Deploy/Rainbows in alternating frames](https://raw.githubusercontent.com/pimoroni/st7789-python/master/square-lcd-breakout-1.gif)
13+
- [1.54" SPI Colour Square LCD (240x240) Breakout](https://shop.pimoroni.com/products/1-54-spi-colour-square-lcd-240x240-breakout)
14+
- [1.3" SPI Colour Square LCD (240x240) Breakout](https://shop.pimoroni.com/products/1-3-spi-colour-lcd-240x240-breakout)
15+
- [1.3" SPI Colour Round LCD (240x240) Breakout](https://shop.pimoroni.com/products/1-3-spi-colour-round-lcd-240x240-breakout)
16+
- [Display HAT Mini](https://shop.pimoroni.com/products/display-hat-mini) (2.0" 320x240 LCD)
17+
18+
![Photo showing four different Pimoroni ST7789-based products](st7789-combined.jpg)
1419

1520
# Installation
1621

17-
Make sure you have the following dependencies:
22+
First, make sure you have the following dependencies:
1823

19-
````
20-
sudo apt-get update
21-
sudo apt-get install python-rpi.gpio python-spidev python-pip python-pil python-numpy
24+
````bash
25+
sudo apt update
26+
sudo apt install python-rpi.gpio python-spidev python-pip python-pil python-numpy
2227
````
2328

2429
Install this library by running:
2530

31+
````bash
32+
sudo pip3 install st7789
2633
````
27-
sudo pip install st7789
28-
````
2934

30-
You might also need to enable I2C and SPI in raspi-config. See example of usage in the examples folder.
35+
You will also need to make sure I2C and SPI are enabled in raspi-config (`sudo raspi-config`) - you can find them under Interface Options.
36+
37+
# Examples
38+
39+
You can find some examples of use in the examples folder. Clone this repo with:
40+
41+
```bash
42+
git clone https://github.com/pimoroni/st7789-python
43+
```
44+
45+
and navigate into the examples folder with:
46+
47+
```bash
48+
cd ~/st7789-python/examples/
49+
```
50+
51+
You can pass most of them a parameter (`square`, `rect`, `round`, or `dhmini`) to specify the size/shape/rotation of screen, like this:
3152

53+
```bash
54+
python3 shapes.py dhmini
55+
```
3256

3357
# Licensing & History
3458

st7789-combined.jpg

144 KB
Loading

0 commit comments

Comments
 (0)