Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AnthonyKNorman/MicroPython_ST7735
https://github.com/AnthonyKNorman/MicroPython_ST7735
Last synced: about 16 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/AnthonyKNorman/MicroPython_ST7735
- Owner: AnthonyKNorman
- Created: 2016-10-24T08:06:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-03T10:54:27.000Z (about 8 years ago)
- Last Synced: 2024-08-02T20:45:18.680Z (3 months ago)
- Language: Python
- Size: 86.9 KB
- Stars: 25
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mpython - MicroPython_ST7735 - Driver for ST7735 128x128 TFT. (精选驱动库 / 显示类)
- awesome-micropython - MicroPython_ST7735 - Driver for ST7735 128x128 TFT. (Libraries / Display)
README
# 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
```python
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
```python
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