Skip to content

AnthonyKNorman/MicroPython_ST7735

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroPython_ST7735S

Last update added support for a cheap 128x128 TFT display. offset - offsets the display by that number of pixels horizontally and vertically c_mode - Swaps around Blue and Red in the 565 colour packet. It seems some displays swap these.

Sample usage

import ST7735

# height defaults to 160
ST7735.ST7735_TFTHEIGHT = 128
spi = machine.SPI(1, baudrate=8000000, polarity=0, phase=0)

# move image 3 pixels across and down
# RGB is reversed = c_mode fixes that
d = ST7735.ST7735(offset=3, c_mode='BGR')
d.reset()
d.begin()
d._bground = 0xffff
d.fill_screen(d._bground)

This is for a 128 x 160 display that uses a different set of pins to the default

import ST7735
spi = machine.SPI(1, baudrate=8000000, polarity=0, phase=0)
d = ST7735.ST7735(spi, rst=4, ce=5, dc=16)
d.reset()
d.begin()
d._bground = 0xffff
d.fill_screen(d._bground)

.mpy versions are available in the releases

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy