Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A display library: implemented purely in Micropython. 纯 Micropython 实现的显示库

License

NotificationsYou must be signed in to change notification settings

funnygeeker/micropython-easydisplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

简体中文 (Chinese)

micropython-easydisplay

  • A display library forMicropython: high versatility, multifunctionality, implemented purely inMicropython.
  • ThisREADME may contain translations that are not entirely accurate.

Display Effects

The following are the display effects of version2.0.IMG_20231107_235742IMG_20231107_004226IMG_20231107_004229

Project Features

  • Ability to display non-ASCII characters, such as Chinese and special symbols, by importingbmf font files.
  • Supports displayingPBM images inP4/P6 format andBMP images in24-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 ofMicroPython. It is implemented purely with nativeMicroPython and does not require firmware compilation. Additionally, it maintains high efficiency as much as possible.
  • Supports multiple screen models such asSSD1306,ST7735, andST7789. It also supports driving high-resolution screens on low-memory development boards (e.g.,ESP32C3 driving240*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 thedat 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 usageimporttimefrommachineimportSPI,Pinfromdriverimportst7735_buffromlib.easydisplayimportEasyDisplay# ESP32S3 & ST7735spi=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!

About

A display library: implemented purely in Micropython. 纯 Micropython 实现的显示库

Topics

Resources

License

Stars

Watchers

Forks

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp