Code Monkey home page Code Monkey logo

lv_st7789's Introduction

lv_st7789 Hybrid MicroPython LVGL driver for ST7789 Displays

This driver adds support for 320x240, 240x240 and 135x240 ST7789 displays with rotations for the ESP32 to the LVGL MicroPython bindings.

Install and Build

Pre-compiled firmware.bin

See the firmware directory for a pre-compiled firmware files you can flash to an ESP32 device using the esptool.py utility.

Directory File Device
tdisplay firmware.bin LILYGO® TTGO T-Display or GENERIC ESP32
twatch-2020 firmware.bin LILYGO® T-Watch 2020 or 16MB GENERIC ESP32

Examples

See the examples directory for several example LVGL MicroPython programs configured for the LILYGO® TTGO T-Display and LILYGO® T-Watch 2020 devices.

Parameters and defaults

    st7789(
        miso=-1, mosi=19, clk=18, cs=5, dc=16, rst=23, power=-1, power_on=0
        backlight=4, backlight_on=1, spihost=esp.HSPI_HOST, mhz=40, factor=4,
        hybrid=True, width=135, height=240, colormode=COLOR_MODE_BGR, rot=PORTRAIT,
        initialize=True)
Arg Description
miso Pin for SPI Data from display, -1 if not used as many st7789 displays do not have this pin
mosi Pin for SPI Data to display (REQUIRED)
clk Pin for SPI Clock (REQUIRED)
cs Pin for display CS
dc Pin for display DC (REQUIRED)
rst Pin for display RESET
power Pin for display Power ON, -1 if not used
power_on Pin value for Power ON
backlight Pin for display backlight control
backlight_on Pin value for backlight on
spihost ESP SPI Port
mhz SPI baud rate in mhz
factor Decrease frame buffer by factor
hybrid Boolean, True to use C refresh routine, False for pure Python driver
width Display width
height Display height
colormode Display colormode
rot Display orientation, PORTRAIT, LANDSCAPE, INVERSE_PORTRAIT, INVERSE_LANDSCAPE
invert Display invert colors setting
double_buffer Boolean, True to use double buffering, False to use single buffer (saves memory)
half_duplex Boolean, True to use half duplex SPI communications
asynchronous Boolean, True to use asynchronous routines
initialize Boolean, True to initialize display

lv_st7789's People

Contributors

russhughes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.