2024.11.23
ESP32 + 2.4" LCD 보드가 며칠전 도착
업체 설명 페이지에 있던 링크에서 파일 다운로드
압축 풀면 예제, 문서가 있다
데모에서 TFT_RAINBOW를 PlatformIO로 빌드 시도
PlatformIO에서 아두이노 프로젝트 임포트
빌드 -> TFT_eSPI 못찾는 에러
platformio.ini에 extra include path 추가 -> FS.h를 못찾는 에러 발생
build_flags = -I"C:\Users\user\Desktop\Dev\2.4inch_ESP32-2432S024\2.4inch_ESP32-2432S024\1-Demo\Demo_Arduino\libraries\TFT_eSPI"
library 디렉토리에서 문서 발견
[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
board = esp32dev
framework = arduino
lib_deps = bodmer/TFT_eSPI@^2.4.31
build_flags =
...
그래도 여러 문제 발생
https://docs.platformio.org/en/latest/projectconf/sections/env/options/library/lib_deps.html
드디어 빌드가 되었으나 화면 안나옴
시리얼 모니터에는 반응있음
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
LVGL 프로젝트에서 생겼던 TFT_eSPI 버전 문제인가 싶어 데모 library 버전과 platformio에 인스톨된 버전 확인 후 수정
-> 그래도 화면 안나옴
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
유저 메뉴얼 디렉토리 문서 확인
User_Setup.h를 수정하라고 한다.
#define ILI9341_2_DRIVER
#define TFT_WIDTH 240
#define TFT_HEIGHT 320
#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS 15 // Chip select control pin
#define TFT_DC 2 // Data Command control pin
// #define TFT_RST 4 // Reset pin (could connect to RST pin)
#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
#define TOUCH_CS 33
#define TFT_BL 21
#define TFT_BACKLIGHT_ON HIGH
다시 빌드 화면 나온다.
정리
- PlatformIO에서 Arduino Demo 프로젝트 임포트
- platformio.ini 를 수정
- lib_deps
- monitor_speed
- TFT_eSPI/User_Setup.h 수정
- ILI9488_2
- TFT_WIDTH, HEIGHT
- TFT_PINs, TOUCH, TFT_BL
'IT > Platform' 카테고리의 다른 글
[아두이노] ESP32-2423: #3 PlatformIO & Touch (0) | 2024.11.24 |
---|---|
[아두이노] ESP32-2423: #2 PlatformIO & LVGL (0) | 2024.11.24 |
[TFT LCD] ili9488 LVGL 재도전 #4 EEZ & LOLIN & PlatformIO (1) | 2024.11.03 |
[TFT LCD] ili9488 LVGL 재도전 #3 STM32F103 (2) | 2024.11.02 |
[TFT LCD] ili9488 LVGL 재도전 #2 (3) | 2024.11.01 |