App:Library:LVGL

提供: robot-jp wiki
2022年8月12日 (金) 10:49時点におけるTakashi (トーク | 投稿記録)による版 (→‎eclipse IDE用)
ナビゲーションに移動検索に移動

Arduino IDE用

install

Arduino IDE

Arduino公式ページ または Windows Store からインストールして下さい。

library:lv_Arduino

Arduino IDEを起動、"ツール" → "ライブラリを管理..." → 検索:"LVGL"
LVGL Ard install 01.jpg
"lv_arduino" をインストールします。

lvgl,lv_exampleはArduino非対応のため、インストールされているとlv_arduinoが正しく動作しません。
既にインストールされている時は消去して下さい。

フォルダ丸ごと消してからアプリを再起動すればアンインストール完了です。
場所は、"ファイル"→"環境設定"→"スケッチブックの保存場所" の "libraries" フォルダ内です。

以上でインストール完了です。

動作確認

ここでは TFT_eSPI + LVGL の組み合わせで動作確認をします。

TFT_eSPIは結線情報をヘッダーファイル(User_Setup.h)内に保存するため、色々なスケッチ例をほぼ変更なしで動かす事ができます。
回路の結線は次の接続を想定しています。

ILI9341 ESP32-DevKitC
LCD VCC +3.3V_OUT
GND GND
CS D14
RESET D33
DC D27
SDI(MOSI) D19 (VSPI-MOSI)
SCK D18 (VSPI-SCK)
LED D32
SDO(MISO) D18 (VSPI-MISO)
Touch

Panel

T_CLK D18 (VSPI-SCK)
T_CS D4
T_DIN(MOSI) D19 (VSPI-MOSI)
T_DO(MISO) D18 (VSPI-MISO)
T_IRQ D15
SD SD_CS D5
SD_MOSI D19 (VSPI-MOSI)
SD_MISO D18 (VSPI-MISO)
SD_SCK D18 (VSPI-SCK)

※LovyanGFX+LVGLの組み合わせでの動作確認をする方法は、チュートリアルビデオ:(日本語字幕)LVGL8 | Ep 0. GFX Setup (ft. LovyanGFX)]を参照して下さい。

library:TFT_eSPIのインストール

実際に画像を表示して動作確認するため、このディスプレイドライバをインストールします。
Arduino IDEを起動、"ツール" → "ライブラリを管理..." → 検索:"TFT_eSPI"
LVGL Ard install 02.jpg
インストールフォルダの中にある User_Setup.h を直接エディタで編集します。

User_Setup.hの場所は、"ファイル"→"環境設定"→"スケッチブックの保存場所" の "libraries/TFT_eSPI" 内です。

Line 変更後 説明
45付近 #define ILI9341_DRIVER (使用するディスプレイに合わせて変更) ILI9341の場合
130-131 // #define TFT_BL   32

// #define TFT_BACKLIGHT_ON HIGH  

#define TFT_BL   32
  1. define TFT_BACKLIGHT_ON HIGH  
LCD_LEDを制御する場合
168-170 #define TFT_CS   PIN_D8
  1. define TFT_DC   PIN_D3
  1. define TFT_RST  PIN_D4
//#define TFT_CS   PIN_D8

//#define TFT_DC   PIN_D3

//#define TFT_RST  PIN_D4

NodeMCUのためコメントアウト
205-210 //#define TFT_MISO 19

//#define TFT_MOSI 23

//#define TFT_SCLK 18

//#define TFT_CS   15

//#define TFT_DC    2

//#define TFT_RST   4

#define TFT_MISO 19
  1. define TFT_MOSI 23
  1. define TFT_SCLK 18
  1. define TFT_CS   14
  1. define TFT_DC   27
  1. define TFT_RST  33
LCDと接続するSPIのポートに設定
223 //#define TOUCH_CS 21 #define TOUCH_CS 4 タッチセンサのCS
342 #define SPI_FREQUENCY  27000000 (使用する基板に合わせて変更) 40000000以下にする

320*240pxなら10000000でもok


スケッチ例を動かす

TFT_eSPIの設定が問題ない事の確認

タッチセンサと画像表示の両方を確認します。
"ファイル" → "スケッチ例" → "TFT_eSPI" → "General" → "Touch_caribrate"
最初に四隅をタッチしてタッチセンサをキャリブレートした後で、触った所に色が付けば動作確認OKです。

LVGLの動作確認①

タッチセンサと画像表示の両方を確認するため、スライダーを動かすサンプルを動かします。
"ファイル" → "スケッチ例" → "lv_arduino" → "ESP32_TFT_Slider"
スライダーを操作できればOKです。

LVGLの動作確認②

Real-world LVGL demo example?ここのbodmer氏の投稿にある

LVGL_ESP32_Test_1.zip (3.45 KB)

これをダウンロード・解凍して、その中にフォルダが現れます。

LVGL_ESP32_Test_1
Callbacks.ino
Loop.ino
LVGL_ESP32_Test_1.ino
Setup.ino

これを実行ファイルを置いている場所にフォルダごとコピーして、LVGL_ESP32_Test_1.ino を実行します。 スライダー等が表示されて操作できればOKです。

LVGL+Arduino(lv_arduino) Tutorial Video

YouTube OS 作者 内容 lvgl.h TFT_eSPI LovyanGFX
(日本語字幕)LVGL8 | Ep 0. GFX Setup (ft. LovyanGFX)] Mac That Project LVGL+LovyanGFX
Part.0 - Touch Display Setup for Simple Note App📝

※日本語自動翻訳

That Project 配線

I/O Port 設定

TFT_eSPI インストール

タッチ位置調整

LCD向き設定(横長)

Part.1 - Basic LittlevGL for Simple Note App📝 That Project
Part.2 - By LittlevGL for Simple Note App📝 That Project
ESP32 + ESP-NOW + LVGL7

Part 1/2 - LVGL UI Layout

※日本語自動翻訳

ESP32 + ESP-NOW + LVGL7

Part 2/2 - ESP-NOW bidirectional Comm (Primary - Secondary)

※日本語自動翻訳

ESP32 Dynamic WIFI configuration GUI using LVGL7.x

Part 1/2 - Basic Setting

※日本語自動翻訳

eclipse IDE用

ドキュメント日本語訳

LVGL Ver8.2 docs

Introduction

Introduction

Requirements

License

Repository layout

Release policy

FAQ

Examples

Get started

Styles

Animations

Events

Layouts

Scrolling

Widgets

Get started

Quick overview

Get started in a simulator

Add LVGL into your project

Learn the basics

Examples

porting

Set up a project

Display interface

Tick interface

Task Handler

Sleep management

Operating system and interrupts

Logging

Add custom GPU

Overview

Objects

Positions, sizes, and layouts

Styles

Style properties

Scroll

Layers

Events

Input devices

Displays

Colors

Fonts

Images

File system

Animations

Timers

Drawing

New widget

Widgets

Base object (lv_obj)

Core widgets

Extra widgets

Layouts

Flex

Grid

3rd party libraries

File System Interfaces

BMP decoder

JPG decoder

PNG decoder

GIF decoder

FreeType support

QR code

Lottie player

FFmpeg support

Others

Snapshot

Monkey

Grid navigation

Contributing

Introduction

Pull request

Developer Certification of Origin (DCO)

Ways to contribute

Changelog

Roadmap

LVGL Readme (github)

日本語 English

LVGL+eclipse Tutorial Video

YouTube OS 作者 内容 IDE lvgl.h TFT_eSPI LovyanGFX
ILI9341 TFT LCDからESP32-ディスプレイ、SDカード、およびタッチの完全な方法。 TFT_eSPIドライバーの使用 XTronical TFT_eSPIの設定
LVGL8 | Ep 0. GFX Setup (ft. LovyanGFX)] Mac That Project Arduino環境構築
How to Run Littlev Graphics Library in PC Simulator (Linux)

※lv_pcはproj_pcに変更。

※最後のRun configuurationsでC/C++ Appricationsに"~/eclipse-workspace/proj_pc/Debug/proj_pc"を設定。

Linux LVGL Linux環境のSetupからSimを動かすまで。

インストール:SDL2,JRE,Eclipse

Run:PC Simulator

※Sim内容の説明なし

Eclipse
GUI on ESP32 with 30 FPS using LittlevGL LVGL 動作のdemoのみ ESP32

320x240_30fps

TFT

ILI9341

SPI_40MHz

Make your own System Monitor with ESP32 + LVGL 8
ESP32-Watch for OpenHaystack
QR Code Maker (ESP32+LVGL8)
Not AirTag, But ESP32Tag
ESP32 | LVGL8 | Ep3.WiFi設定の基本プロジェクト
ESP32 Dynamic WIFI configuration GUI using LVGL7.x

Part 2/2 - Application Structure

SquareLine Studio

[EN]

インストール

次の順にインストールします。

  1. Git
  2. ESP-IDF+Eclipse
  3. SquareLine Studio

Readme 日本語訳

https://docs.squareline.io/docs/squareline/

Welcome

ようこそ

[EN] Welcome

Introduction (2)

はじめに

[EN] Overview

[EN] Typical Development Workflow

[EN] Licenses

[EN] Installation

[EN] Getting Started

[EN] Licence Manager

Designer environment

環境

[EN] How to use the SquareLine Studio layout?
[EN] Launcher
[EN] Preferences
[EN] Project Settings

Panels

[EN] Animation Panel
[EN] Asset Panel
[EN] Console Panel
[EN] Font Manager Panel
[EN] Hierarchy Panel
[EN] History Panel
[EN] Inspector Panel
[EN] Widget Panel

Styles

スタイル

[EN] Styles

Events and Actions

イベントとアクション

Events and Actions [EN]

Miscellaneous

その他

[EN] Changelog

[EN] How to upgrade SquareLine Studio to an up-to-date version?

[EN] Getting Help

[EN] Third Party Components in SquareLine Studio

Tutorials

チュートリアル

[EN] Tutorial 1 - Trying out an Example

[EN] Tutorial 2 - Create a New Application

[EN] Tutorial 3 - Add Styles

[EN] Tutorial 4 - Add Events

SuareLine Studio チュートリアル ビデオ

https://youtu.be/9qp3Lmc8r-Q

Developing Embedded GUI with Open Source LVGL.
SquareLine Studio
Basic Tutorial #1:Get started
#2:Create a New Project
#3:Styles
#4:Events and Actions
#5:Animations
Create an Impressive UI in 10 Minutes without Images
Part.1: Creating Tesla's Website in SquareLine Studio (ESP32+LVGL)
Part.2: Creating Tesla's Website in SquareLine Studio (ESP32+LVGL)

Link

LVGL 公式

LVGL https://lvgl.io/ (訳)
LVGL docs https://docs.lvgl.io/master/index.html (訳)
Github https://github.com/lvgl/lvgl (訳)
SquareLine Studio https://squareline.io/
SquareLine Studio docs https://docs.squareline.io/docs/squareline/ (訳)
LVGL's Blog

(ESP32関連)

2019/08/05 Pure Micropython Display Driver (訳)

2019/02/23 New release v5.3 - Micropython support, New object types, new features (訳)

2019/02/02 How to use the iPod Nano 6 LCD for LittlevGL (訳)

2019/01/31 Espressif officially supports LittlevGL on ESP32! Let's try it! (訳)

2018/12/26 LittlevGL References (訳)

関連資料 (ESP32+LVGL)

参考 macsbug | LVGL 8 demo with 800×480 LCD and ESP32 S2 WROVER
OSRTOS | LittlevGL (訳)
Youtube ESP32 | LittlevGL | Arduino IDE - [Part.0] Touch Display Setup for Simple Note App

ESP32 | LittlevGL | Arduino IDE - [Part.1] Basic LittlevGL for Simple Note App


GUI on ESP32 with 30 FPS using LittlevGL


ESP32 | LVGL8 | Ep 0. GFX Setup

ESP32 | LVGL8 | Ep 1. Demos with LILY PI

ESP32 | LVGL8 | Ep 3. Base Project for WiFi Settings

トイカメラを作ります! = ESP32CAM + ILI9488 + LVGL7 | Part1、リアルタイムディスプレイ

トイカメラを作ります! = ESP32CAM + ILI9488 + LVGL7 | Part2、LVGL設定

補足事項

  • Arduino IDE の場合、ライブラリマネージャからLVGLをインストール可。
  • Linux(ubuntu) に Eclipse + ESP-IDF を入れる方法:1 , 2 ,
  • LVGLは旧名LittlevGL
  • LVGL作者は基本的には Linux+Eclipse+SDK の環境



戻る/Previous