ESP32 ArduinoNVS or Preferences - unable to store Strings of 80 bytes.
Hello everyone.
Having not found the solution to store 80-byte files on SPIFFS or with LittleFS, I tried initially in vain with the ArduinoNVS library and then with Preferences.
In both cases, it seems impossible to store more than 8 bytes: the recording process goes well, but upon rereading, the file is empty.
The recording routine:
The result correctly indicates the number of bytes saved. However, upon rereading, the recording is empty.
If anyone has an idea for this problem.
1 Reply
Well the code seems good . It looks like storing large files using Preferences is causing issues. Think of Preferences like a storage box that's good for small things, not big files. To solve this, try using a different storage method like SPIFFS or LittleFS, which are like bigger storage boxes that can handle larger files.
If you still want to use Preferences, imagine breaking the big file into smaller pieces and storing them separately. When you need the whole file, grab these pieces and put them together.
Remember, always check the instructions for the storage method you're using to make sure it can handle the size and type of data you're dealing with.