Hey guys, David here. I’ve been having some trouble with getting LVGL to display png images from an SD card. When trying to do so, I ended up with an unexpected error that I haven’t seen documented much. I put “lv_img_set_src(objects.at1010, “A:test8bit.png”);” in my void setup(), and I get a not in scope error and I don’t quite understand why. I’m hoping it’s something simple, but I already tried looking at other example code that uses the same or similar syntax and I’m wondering if there’s a deeper issue that I haven’t considered yet.
Error:
Code:
flowTest.zip (200.2 KB)
lv_conf.h:
lv_conf.h (25.8 KB)
ffconf.h:
ffconf.h (11.5 KB)
Setup:
Arduino IDE 1.8.19
macOS Sonoma 14.6
M2
LVGL 8.3
EEZ Studio 0.15.1
LVGL + EEZ Flow Project used
ESP32S3
32GB Sandisk SD Card formatted with FAT32
notable lv_conf.h changes:
LV_MEM_SIZE: 48 originally, later changed to 240 KB to handle larger PNGs
#define LV_USE_FS_FATFS 1
#if LV_USE_FS_FATFS
#define LV_FS_FATFS_LETTER ‘A’ /Set an upper cased letter on which the drive will accessible (e.g. ‘A’) 03/10/25 09:29:06 PM CHANGED FROM ‘\0’ to ‘A’ /
#define LV_FS_FATFS_CACHE_SIZE 0 />0 to cache this number of bytes in lv_fs_read()/
#endif
ffconf.h was not changed yet.