Giter Club home page Giter Club logo

micropython-easydisplay's Introduction

简体中文 (Chinese)

micropython-easydisplay

  • A display library for Micropython: high versatility, multifunctionality, implemented purely in Micropython.
  • This README may contain translations that are not entirely accurate.

Display Effects

The following are the display effects of version 2.0. IMG_20231107_235742 IMG_20231107_004226 IMG_20231107_004229

Project Features

  • Ability to display non-ASCII characters, such as Chinese and special symbols, by importing bmf font files.
  • Supports displaying PBM images in P4/P6 format and BMP images in 24-bit.
  • Default parameters can be set during initialization, making function calls more concise. Additionally, the current function call can override the default parameters.
  • Compatible with most official and unofficial versions of MicroPython. It is implemented purely with native MicroPython and does not require firmware compilation. Additionally, it maintains high efficiency as much as possible.
  • Supports multiple screen models such as SSD1306, ST7735, and ST7789. It also supports driving high-resolution screens on low-memory development boards (e.g., ESP32C3 driving 240*240 ST7789 screens).

Usage

  • Please refer to the source code comments.(The comments section is written in Chinese and may need translation in order to read.)

Note

For images in the dat format, make sure that they do not exceed the screen display area when using non-framebuffer driver modes. Otherwise, the image may not be displayed correctly.

Example Code

# 这是一个使用示例 This is an example of usage
import time
from machine import SPI, Pin
from driver import st7735_buf
from lib.easydisplay import EasyDisplay

# ESP32S3 & ST7735
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))
dp = st7735_buf.ST7735(width=128, height=128, spi=spi, cs=14, dc=15, res=16, rotate=1, bl=13, invert=False, rgb=False)
ed = EasyDisplay(dp, "RGB565", font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True)

ed.bmp("/img/test.bmp", 0, 0)
time.sleep(3)
ed.pbm("/img/test.pbm", 0, 0)
time.sleep(3)
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)

# 更多高级使用方式详见源码注释:/lib/easydisplay.py
# For more advanced usage, please refer to the source code comments: /lib/easydisplay.py

Special Thanks

Reference projects:

Chinese display: https://github.com/AntonVanke/MicroPython-Chinese-Font

BMP image display: https://github.com/boochow/MicroPython-ST7735/blob/master/tftbmp.py

References

PBM image display: https://www.bilibili.com/video/av798158808/

PBM file format: https://www.cnblogs.com/SeekHit/p/7055748.html

PBM file conversion: https://blog.csdn.net/jd3096/article/details/121319042

Grayscale, binarization: https://blog.csdn.net/li_wen01/article/details/72867057

Others

Thanks to all contributors for their contributions to open source!

micropython-easydisplay's People

Contributors

funnygeeker avatar xusmochizuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

micropython-easydisplay's Issues

关于ST7789demo的问题

大佬您好,我用esp32s3n16r8的板子+st7789驱动的lcd屏幕无法显示内容,能提供一下st7789驱动的demo吗?

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.