百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

LovyanGFX

> DevOps
开源

用于 ESP32(ESP-IDF/ArduinoESP32)、ESP8266(ArduinoESP8266)和 SAMD51(Seeed ArduinoSAMD51)的 SPI LCD 图形库

1.7K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

用于 ESP32(ESP-IDF/ArduinoESP32)、ESP8266(ArduinoESP8266)和 SAMD51(Seeed ArduinoSAMD51)的 SPI LCD 图形库

LovyanGFX

Display (LCD / OLED / EPD) graphics library (for ESP32 SPI, I2C, 8bitParallel / ESP8266 SPI, I2C / ATSAMD51 SPI).
M5Stack / M5StickC / TTGO T-Watch / ODROID-GO / ESP-WROVER-KIT / WioTerminal / and more...
概要 Overview.

ESP32とSPI, I2C, 8ビットパラレル接続のディスプレイ / ESP8266とSPI接続のディスプレイ / ATSAMD51とSPI接続のディスプレイの組み合わせで動作するグラフィックライブラリです。
This is a graphics library that works with a combination of ESP32 with SPI, I2C, 8-bit parallel / ESP8266 with SPI / ATSAMD51 with SPI to the Display. (see compatibility list below).

AdafruitGFX や TFT_eSPI と互換性をある程度持ちつつ、より高機能・高速動作を目標としています。

This library mimics AdafruitGFX and TFT_eSPI APIs while aiming for higher functional coverage and performances.

既存のライブラリに対して、以下のアドバンテージがあります。

  • ArduinoESP32 / ESP-IDF 対応
  • 16bit / 24bitカラーモード両対応(実際の色数はディスプレイの仕様によります)
  • DMA転送を用いた通信動作中の別処理実行
  • オフスクリーンバッファ(スプライト)の高速な回転/拡縮描画
  • 複数ディスプレイの同時利用
  • モノクロディスプレイに対する減色描画の自動処理
  • OpenCV,SDL2を描画先として利用でき、PC上で動作可能
  • コンポジットビデオ信号(NTSC,PAL)を出力できます (ESP32のみ)

This library has the following advantages.

  • ArduinoESP32 and ESP-IDF are supported.
  • Both 16bit and 24bit color modes are supported. (actual number of colors depends on display specifications)
  • Execute another process during communication operation using DMA transfer.
  • Fast rotation/expansion of the off-screen buffer (sprite).
  • Simultaneous use of multiple displays.
  • Automatic processing of color reduction drawing for monochrome displays.
  • OpenCV,SDL2 can be used as a drawing destination and can run on a PC.
  • Composite video signal (NTSC, PAL) output (only ESP32)
SPI I2C 8bit Para 16bit Para RGB CVBS ESP32 HW HW HW (I2S) --- --- HW(I2SDAC) ESP32-S2 HW HW HW (I2S) HW (I2S) --- --- ESP32-S3 HW HW HW(LCD/CAM) HW(LCD/CAM) HW(LCD/CAM) --- ESP32-C3 HW HW SW --- --- --- ESP8266 HW SW --- --- --- --- SAMD51 HW HW --- --- --- --- SAMD21 HW HW --- --- --- --- RP2040 HW --- --- --- --- ---

※ HW = HardWare Peripheral / SW = SoftWare implementation

TouchScreens ESP32 supported ESP32-S2 supported ESP32-S3 supported ESP32-C3 supported ESP8266 supported SAMD51 supported SAMD21 supported RP2040 ---

対応環境 Supported environments

  • プラットフォーム Platform

    • ESP-IDF
    • Arduino ESP32
    • Arduino ATSAMD51 (Seeed)
    • Arduino RP2040
  • ディスプレイ Displays

    • GC9107 (M5AtomS3)

    • GC9A01

    • GC9B72 (GalaxyCore GC9B72 controller on 2.1-inch 360×360 round SPI TFT panels)

    • GDEW0154M09 (M5Stack CoreInk)

    • HX8357

    • ILI9163

    • ILI9225

    • ILI9341 (WioTerminal, ESP-WROVER-KIT, ODROID-GO, LoLin D32 Pro, WiFiBoy Pro)

    • ILI9342 (M5Stack, M5Stack Core2, ESP32-S3-BOX)

    • ILI9481

    • ILI9486

    • ILI9488 (Makerfabs Touch with Camera)

    • IT8951 (M5Paper)

    • NT35510/OTM8009A

    • R61529

    • RA8875

    • RM68120

    • SH110x (SH1106, SH1107, M5Stack Unit OLED)

    • S6D04K1

    • SSD1306 (SSD1309)

    • SSD1327

    • SSD1331

    • SSD1351 (SSD1357)

    • SSD1963

    • ST7735 (M5StickC, TTGO T-Wristband, TTGO TS, LoLin D32 Pro, WiFiBoy mini, ESPboy, PyBadge)

    • ST7789 (M5StickCPlus, TTGO T-Watch, ESP-WROVER-KIT, Makerfabs MakePython, DSTIKE D-duino-32 XS)

    • ST7796 (WT32-SC01)

    • ST77916 (JC3636W518C)

    • M5Stack Unit LCD

    • M5Stack AtomDisplay

  • タッチスクリーン TouchScreens

    • I2C CST816S
    • I2C FT5x06 (FT5206, FT5306, FT5406, FT6206, FT6236, FT6336, FT6436)
    • I2C GSLx680 (GSL1680)
    • I2C GT911
    • I2C NS2009
    • I2C TT21xxx (TT21100)
    • SPI XPT2046
    • SPI STMPE610

設定方法のサンプルはsrc/lgfx_userにあります。
上記対応機種とコマンド体系の類似したディスプレイであれば対応可能ですが、当方で入手し動作確認が取れたもののみ正式対応としています。
対応要望を頂けた機種には優先的に対応を検討致します。

setting examples is src/lgfx_user
This library is also compatible with the above models and display panels with a similar command system, but only those that have been obtained and confirmed to work are officially supported.

使い方 How to use

examplesに具体的なサンプルがあります。

基本的な使い方

…

注意・制限事項

ESP-IDF で arduino-esp32 をコンポーネントとして併用する場合

本ライブラリはビルド内の Arduino コンポーネント (arduino / arduino-esp32 / espressif__arduino-esp32) を自動的にリンクし、アプリケーションと同じ ARDUINO 定義でコンパイルされます (揃っていないと同じクラスをアプリ側とライブラリ側で異なるレイアウトで読み、クラッシュします)。別名のコンポーネントは CMake キャッシュ変数 LGFX_ARDUINO_COMPONENT=<name>、無効化は LGFX_ARDUINO_COMPONENT=OFF で指定できます。
When arduino-esp32 is used as an ESP-IDF component together with this library, the library links the Arduino component automatically (it looks for a component named arduino, arduino-esp32 or espressif__arduino-esp32 in the build) so that it is compiled with the same ARDUINO definitions as the application. Without that, the application and the library would see different layouts of the same classes. Set LGFX_ARDUINO_COMPONENT=<name> (CMake cache variable) if your Arduino component has another name, or LGFX_ARDUINO_COMPONENT=OFF to disable this.

M5Stack.h(M5StickC.h)と共存させる方法

方法1

include <M5Stack.h> より後に include <LovyanGFX.hpp> を書いてください。
M5.Lcdは使わずに、別途LGFXのインスタンスを用意して使用してください。

方法2

ESP32-Chimera-Core を利用すると、M5.Lcd が LovyanGFX になります。

作成動機 Motivation behind this library

TFT_eSPIは素晴らしいライブラリです。しかし、複数のアーキテクチャを対象とするため構造的に複雑となっており、ESP-IDFへの対応や18bitカラーへの対応など、求める機能の追加を行う事が非常に困難となっていました。
LovyanGFX はこれらの機能の追加とパフォーマンスの最適化を実現するために作成しました。

TFT_eSPI is a great library. However, it is structurally complex because it targets multiple architectures, making it very difficult to add required functions such as ESP-IDF support and 18-bit color support.
LovyanGFX has been created to add these features and optimize performance.

謝辞 Acknowledgements

このライブラリを作成するにあたり、インスピレーションを頂いたTFT_eSPIライブラリの作者Bodmer氏へ感謝いたします。
TFT_eSPIのベースとなった、AdafruitGFXを公開されているAdafruit Industriesへ感謝いたします。
TJpgDec (Tiny JPEG Decompressor) の作者 ChaN氏へ感謝いたします。
Pngle (PNG Loader for Embedding) の作者 kikuchan氏へ感謝いたします。
QRCode (QR code generation library) の作者 Richard Moore氏へ感謝いたします。
多くの技術的なアドバイスやESP-IDF環境での検証に協力してくださったciniml氏へ感謝いたします。
不具合の多い開発初期からの動作検証および多数の助言をくださったmongonta0716氏へ感謝いたします。
多数のボードでの動作検証や英語への翻訳および多数の助言をくださったtobozo氏へ感謝いたします。
フォントデータの作成に協力してくださったTANAKA Masayuki氏へ感謝いたします。
日本語フォントサブセットジェネレーターを製作してくださったYAMANEKO氏へ感謝いたします。
Raspberry pi pico (RP2040)対応に協力してくださったyasuhirok氏へ感謝いたします。
Linux FrameBuffer対応に協力してくださったIAMLIUBO氏へ感謝いたします。
コンポジットビデオ信号をESP32で出力するプロジェクトを公開されているrossum氏とRoger Cheng氏へ感謝いたします。

Thanks to Bodmer, author of the TFT_eSPI library, for the inspiration to create this library.
Thanks to Adafruit Industries for publishing AdafruitGFX, which is the basis for TFT_eSPI.
Thanks to ChaN, author of TJpgDec (Tiny JPEG Decompressor).
Thanks to kikuchan, author of Pngle (PNG Loader for Embedding).
Thanks to Richard Moore, author of QRCode (QR code generation library).
Thanks to ciniml, for many technical tips and help with validation in the ESP-IDF environment.
Thanks to mongonta0716, for verifying the work from the beginning of the development with many bugs and for his advice.
Thanks to tobozo, for testing it on various boards, translating it into English and giving me a lot of advice.
Thanks to TANAKA Masayuki, for creating the font data.
Thanks to YAMANEKO, for creating the lgfxFontSubsetGenerator.
Thanks to yasuhirok, for add Raspberry pi pico (RP2040) support.
Thanks to IAMLIUBO, for add Linux FrameBuffer support.
Thanks to rossum and Roger Cheng, published the project to output a composite video signal from ESP32.

使用ライブラリ included library

TJpgDec ChaN
Pngle kikuchan
QRCode Richard Moore and Nayuki

クレジット Credits

  • Inspiration: Bodmer
  • Author: lovyan03
  • Contributors:
    • ciniml
    • mongonta0716
    • tobozo

ライセンス License

main : FreeBSD
TJpgDec : original ChaN
Pngle : MIT kikuchan
QRCode : MIT Richard Moore and Nayuki
result : MIT Matthew Rodusek
GFX font and GLCD font : 2-clause BSD Adafruit Industries
Font 2,4,6,7,8 : FreeBSD Bodmer
converted IPA font : IPA Font License IPA
efont : 3-clause BSD The Electronic Font Open Laboratory
TomThumb font : 3-clause BSD Brian J. Swetland / Vassilii Khachaturov / Dan Marks

実装予定 Unimplemented request

  • ディスプレイ Displays
    • SEPS525
    • LT7680A / LT7685
    • RA8873 / RA8876

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •ArduinoESP32 / ESP-IDF 対応
  • •16bit / 24bitカラーモード両対応(実際の色数はディスプレイの仕様によります)
  • •DMA転送を用いた通信動作中の別処理実行
  • •オフスクリーンバッファ(スプライト)の高速な回転/拡縮描画
  • •複数ディスプレイの同時利用
  • •モノクロディスプレイに対する減色描画の自動処理
  • •OpenCV,SDL2を描画先として利用でき、PC上で動作可能
  • •コンポジットビデオ信号(NTSC,PAL)を出力できます (ESP32のみ)
  • •ArduinoESP32 and ESP-IDF are supported.
  • •Both 16bit and 24bit color modes are supported. (actual number of colors depends on display specifications)

> 标签

Cdmaesp-idfesp-idf-tft-ili9341gfx

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理