Home

Awesome

MicroPython-ST7735

This is a modified version of GuyCarver's ST7735.py ST7735 TFT LCD driver for MicroPython.

A font file is necessary for displaying text (some font files are in GuyCarver's repo).

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.

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:

LCDESP32-DevKitC
VLED3V3
RSTIO17
A0IO16(DC)
SDAIO13(MOSI)
SCKIO14(CLK)
VCC3V3
CSIO18
GNDGND

YouTube image here

tftbmp.py is another sample similar to Adafruit's tftbmp sketch for Arduino.

Place bmp file named test128x160.bmp in the file system of MicroPython using file uploading tool such as 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.