LittleFS
The design goal of LittleFS is to provide fail-safe filesystem access for MCUs even in case of power loss. All POSIX operations are atomic, which means that when a function call returns successfully, LittleFS makes sure the result is persistent on the filesystem. If you have hard requirements on fail-safety features of the underlying filesystem in a project, then LittleFS can be a good option. In this example, we are going to use a port of LittleFS for ESP-IDF.
You can find the library on GitHub here: https://github.com/joltwallet/esp_littlefs. It comes with an MIT license.
The goal in this example is to develop a door event logger. It will simply log when the door is opened and closed on the LittleFS filesystem. We will use ESP32-S3 Box Lite as the development kit and simulate a door sensor by clicking on a button of the devkit.
There are different methods to include a third-party library in an ESP-IDF project. One of them is the IDF Component Manager. Espressif...