ESP32 File browser in Arduino IDE


How to implement a file browser type interface that lists file from an SD card using the list widget and displays bitmap/jpeg/png images from SD card

What MCU/Processor/Board and compiler are you using?


What do you want to achieve?

Interface with SD card using LVGL and display images onto the screen

What have you tried so far?

I have read the documentation so far, can implement all the basic examples effectively

Code to reproduce


Screenshot and/or video

A youtube video that has implemented this feature can be found

You need a few things:

  • A function which scans a directory for files and adds them to the list.
  • Some logic to handle navigating through directories.
  • Logic which creates an image object/dialog/etc. when you click on a file.

I have an incomplete implementation of this if you want a starting point. This was made back in the days when 6.0 was still in development so I think some APIs will have changed. In particular, if you’re using 7.0, none of the style-related things will work.

Lines 156-158 are where you’d want to add the logic for checking whether the file is an image and displaying it, if it’s not a directory.

still couldn’t figure this out I am not able to figure out how to combine lv_fs_if with SD library from Arduino can anyone help me what should learn more to solve this problem

Support for ESP32’s file system is really missing from lv_fs_if. If you are interested in adding this feature to lv_fs_if please on issue on GitHub and I kindly help.

opened a issue on github

1 Like

can you please help me.
a also need to do something like this