Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boochow/micropython-st7735
ST7735 TFT LCD driver for MicroPython
https://github.com/boochow/micropython-st7735
micropython micropython-esp32
Last synced: 4 days ago
JSON representation
ST7735 TFT LCD driver for MicroPython
- Host: GitHub
- URL: https://github.com/boochow/micropython-st7735
- Owner: boochow
- Created: 2017-11-04T02:40:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T04:09:19.000Z (almost 2 years ago)
- Last Synced: 2024-12-18T14:13:35.237Z (4 days ago)
- Topics: micropython, micropython-esp32
- Language: Python
- Homepage:
- Size: 76.2 KB
- Stars: 211
- Watchers: 6
- Forks: 64
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MicroPython-ST7735
This is a modified version of [GuyCarver's ST7735.py](https://github.com/GuyCarver/MicroPython/blob/master/lib/ST7735.py) ST7735 TFT LCD driver for MicroPython.
A font file is necessary for displaying text (some font files are in [GuyCarver's repo](https://github.com/GuyCarver/MicroPython/tree/master/lib)).
Text nowrap option added(default: nowrap=False).
`graphicstest.py` is a sample code. I wrote this to make it similar to [Adafruit's graphicstest sketch for Arduino](https://github.com/adafruit/Adafruit-ST7735-Library/tree/master/examples/graphicstest).
If `graphicstest.py` doesn't work correctly, try replaceing `initr()` at line 8 to `initg()` or `initb()` or `initb2()`. You can also change `rgb(True)` to `rgb(False)` to switch red and blue pixels if your LCD module shows incorrect colors.
Pin connections for ESP32:
LCD |ESP32-DevKitC
----|----
VLED|3V3
RST |IO17
A0 |IO16(DC)
SDA |IO13(MOSI)
SCK |IO14(CLK)
VCC |3V3
CS |IO18
GND |GND[![YouTube image here](https://img.youtube.com/vi/xIy8DPBZsIk/0.jpg)](https://www.youtube.com/watch?v=xIy8DPBZsIk)
`tftbmp.py` is another sample similar to [Adafruit's tftbmp sketch for Arduino](https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/examples/spitftbitmap/spitftbitmap.ino).
Place bmp file named `test128x160.bmp` in the file system of MicroPython using file uploading tool such as [ampy](https://github.com/adafruit/ampy), etc.
`offscreen-buffer.py` shows how you can use an offscreen frame buffer which is an instance of FrameBuffer class. I tested this on Raspberry Pi Pico. See https://github.com/boochow/MicroPython-ST7735/issues/9 for the pin connections.