kopia lustrzana https://github.com/russhughes/st7789py_mpy
Update readme
rodzic
955a4e8e40
commit
151497a46c
47
README.md
47
README.md
|
@ -1,39 +1,32 @@
|
||||||
st7789.py
|
Python ST7789 driver for MicroPython
|
||||||
=========
|
====================================
|
||||||
|
|
||||||
This is a fork of devbis' st7789py_mpy module from
|
This is a fork of devbis' st7789py_mpy module from
|
||||||
https://github.com/devbis/st7789py_mpy.
|
https://github.com/devbis/st7789py_mpy.
|
||||||
|
|
||||||
I modified the original driver for one of my projects by adding support for
|
This driver adds support for:
|
||||||
display rotation, scrolling and drawing text using 8 and 16 bit wide bitmap
|
|
||||||
fonts with heights that are multiples of 8. Included are 12 bitmap fonts
|
- 320x240, 240x240 and 135x240 pixel displays
|
||||||
derived from classic pc text mode fonts and several example programs that run
|
- Display rotation
|
||||||
on the TTGO T-Display.
|
- Hardware based scrolling
|
||||||
|
- Drawing text using 8 and 16 bit wide bitmap fonts with heights that are
|
||||||
|
multiples of 8. Included are 12 bitmap fonts derived from classic pc
|
||||||
|
BIOS text mode fonts.
|
||||||
|
- Drawing text using converted TrueType fonts.
|
||||||
|
- Drawing converted bitmaps
|
||||||
|
|
||||||
This is a work in progress. Documentation can be found in the docs directory
|
This is a work in progress. Documentation can be found in the docs directory
|
||||||
and at https://penfold.owt.com/st7789py
|
and at https://penfold.owt.com/st7789py.
|
||||||
|
|
||||||
|
|
||||||
Slow ST7789 driver for MicroPython
|
|
||||||
==================================
|
|
||||||
|
|
||||||
This is a slow MicroPython driver for 240x240 ST7789 display without CS pin
|
|
||||||
from Ali Express. It also supports 135x240 TTGO Display
|
|
||||||
|
|
||||||
|
|
||||||
The performance is quite low due to python function call overhead.
|
|
||||||
If you have a chance to build firmware and you are using
|
|
||||||
ESP8266/ESP32 controllers, you should try the fast driver
|
|
||||||
https://github.com/devbis/st7789_mpy
|
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
|
|
||||||
# ESP8266
|
See the examples directory for example programs that run on the LILYGO® TTGO T-Display.
|
||||||
import machine
|
|
||||||
import st7789py
|
|
||||||
spi = machine.SPI(1, baudrate=40000000, polarity=1)
|
|
||||||
display = st7789py.ST7789(spi, 240, 240, reset=machine.Pin(5, machine.Pin.OUT), dc=machine.Pin(4, machine.Pin.OUT))
|
|
||||||
display.init()
|
|
||||||
display.pixel(120, 120, st7789py.YELLOW)
|
|
||||||
|
|
||||||
|
Fonts
|
||||||
|
-----
|
||||||
|
|
||||||
|
See the subdirectories in the fonts directory for the converted font modules
|
||||||
|
used in the examples. These modules can be compiled using the mpy-cross
|
||||||
|
compiler before uploading to save memory.
|
||||||
|
|
Ładowanie…
Reference in New Issue