{"id":19484405,"url":"https://github.com/funnygeeker/micropython-easydisplay","last_synced_at":"2025-04-25T16:33:41.784Z","repository":{"id":65782201,"uuid":"595787567","full_name":"funnygeeker/micropython-easydisplay","owner":"funnygeeker","description":"A display library: implemented purely in Micropython.  纯 Micropython 实现的显示库","archived":false,"fork":false,"pushed_at":"2024-04-27T04:22:40.000Z","size":63921,"stargazers_count":33,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-27T05:23:40.348Z","etag":null,"topics":["bmp","chinese","english","esp01s","esp32","esp32-c3","esp32-s3","framebuffer","japanese","micropython","micropython-esp32","pbm","ssd1306","st7735","st7735s","st7789"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/funnygeeker.png","metadata":{"files":{"readme":"README.ZH-CN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-01-31T20:09:20.000Z","updated_at":"2024-04-27T04:19:38.000Z","dependencies_parsed_at":"2024-02-18T12:36:24.231Z","dependency_job_id":null,"html_url":"https://github.com/funnygeeker/micropython-easydisplay","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnygeeker%2Fmicropython-easydisplay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnygeeker%2Fmicropython-easydisplay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnygeeker%2Fmicropython-easydisplay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnygeeker%2Fmicropython-easydisplay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funnygeeker","download_url":"https://codeload.github.com/funnygeeker/micropython-easydisplay/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224009354,"owners_count":17240540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bmp","chinese","english","esp01s","esp32","esp32-c3","esp32-s3","framebuffer","japanese","micropython","micropython-esp32","pbm","ssd1306","st7735","st7735s","st7789"],"created_at":"2024-11-10T20:21:21.382Z","updated_at":"2024-11-10T20:21:22.283Z","avatar_url":"https://github.com/funnygeeker.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[English (英语)](./README.md)\n\n# micropython-easydisplay\n- 适用于 `Micropython` 的：高通用性，多功能，纯 `Micropython` 实现的显示库\n- 自用，顺便开源，希望能够推动 `Micropython` 生态的发展\n\n\n### 显示效果\n以下为 `2.0` 版本的显示效果\n![IMG_20231107_235742](https://github.com/funnygeeker/micropython-easydisplay/assets/96659329/f76a7713-7397-4a99-8ccd-37af7ebe0cbe)\n![IMG_20231107_004226](https://github.com/funnygeeker/micropython-easydisplay/assets/96659329/e765b55a-45bb-486a-b15e-5161b4d876fa)\n![IMG_20231107_004229](https://github.com/funnygeeker/micropython-easydisplay/assets/96659329/f82910c4-b515-4ffd-a00c-9eafffcbb0bf)\n\n### 项目特点\n- 可以通过导入 `bmf` 字体文件，显示非 `ASCII` 字符，比如：中文 和 特殊符号\n- 支持 `P4`/`P6` 格式的 `PBM` 图片显示，以及 `24-bit` 的 `BMP` 图片显示\n- 初始化时可以设置默认参数，调用函数时更简洁，同时调用指定函数时，本次调用可覆盖默认参数\n- 兼容大多数 `MicroPython` 官方和非官方版本，纯 `MicroPython` 原生实现，不需要进行固件编译，同时尽可能保持了高效率\n- 支持多种屏幕的多种工作模式 `SSD1306`，`ST7735`，`ST7789`，支持低内存开发板驱动高分辨率屏幕（如 `ESP32C3` 驱动 `240*240` `ST7789`）\n\n### 使用方法\n- 详见源码注释\n\n### 注意事项\n`dat` 格式的图片在非 Framebuffer 驱动模式下，不得超出屏幕显示范围，否则图像可能无法正常显示\n\n### 示例代码\n```python\n# 这是一个使用示例 This is an example of usage\nimport time\nfrom machine import SPI, Pin\nfrom driver import st7735_buf\nfrom lib.easydisplay import EasyDisplay\n\n# ESP32S3 \u0026 ST7735\nspi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))\ndp = st7735_buf.ST7735(width=128, height=128, spi=spi, cs=14, dc=15, res=16, rotate=1, bl=13, invert=False, rgb=False)\ned = EasyDisplay(dp, \"RGB565\", font=\"/text_lite_16px_2312.v3.bmf\", show=True, color=0xFFFF, clear=True)\n\ned.bmp(\"/img/test.bmp\", 0, 0)\ntime.sleep(3)\ned.pbm(\"/img/test.pbm\", 0, 0)\ntime.sleep(3)\ned.text(\"你好，世界！\\nHello World!\\nこんにちは、世界！\", 0, 0)\n\n# 更多高级使用方式详见源码注释：/lib/easydisplay.py\n# For more advanced usage, please refer to the source code comments: /lib/easydisplay.py\n```\n\n### 特别致谢\n参考项目：\n\n中文显示：[https://github.com/AntonVanke/MicroPython-Chinese-Font](https://github.com/AntonVanke/MicroPython-Chinese-Font)\n\nBMP图片显示：[https://github.com/boochow/MicroPython-ST7735/blob/master/tftbmp.py](https://github.com/boochow/MicroPython-ST7735/blob/master/tftbmp.py)\n\n\n### 参考资料\nPBM图像显示：[https://www.bilibili.com/video/av798158808/](https://www.bilibili.com/video/av798158808/)\n\nPBM文件格式：[https://www.cnblogs.com/SeekHit/p/7055748.html](https://www.cnblogs.com/SeekHit/p/7055748.html)\n\nPBM文件转换：[https://blog.csdn.net/jd3096/article/details/121319042](https://blog.csdn.net/jd3096/article/details/121319042)\n\n灰度化、二值化：[https://blog.csdn.net/li_wen01/article/details/72867057](https://blog.csdn.net/li_wen01/article/details/72867057)\n\n\n### 其他\n感谢各位大佬对开源做出的贡献！\n\n交流QQ群：[748103265](https://jq.qq.com/?_wv=1027\u0026k=I74bKifU)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnygeeker%2Fmicropython-easydisplay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunnygeeker%2Fmicropython-easydisplay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnygeeker%2Fmicropython-easydisplay/lists"}