How can I store and read data in esp32 flash memory?

How can I store and read data in esp32 flash memory?

I am using SPI communication with a sensor but I want to store the data in esp32 flash memory instead of print it in the serial monitor, then I want to read the data from the memory.

Is there any Arduino code can do that?

@Idahowalker I didnt find how to store the SPI data that I got from the sensors in the flash memory in the link .

Did you try looking up on the internet how to use the littleFS or would you rather I just write the code for you for a fee?

Many feference sketches can be found on this site:
160+ ESP32 Projects, Tutorials and Guides with Arduino IDE​ | Random Nerd Tutorials

Just browse until you find something close to what you need.

ESP32 Preferences

I found in this link " Preferences is good to save a small number of values.
If you need to save huge amounts of data, it is preferable to create a file in SPIFFS and use JSON."

My data is very big, it seems i need SPIFFS, but i didnt find Arduino code for it.

Do you have any idea please?
@Idahowalker

Write your own code. There are lots of tutorials on how to use SPIFFS in ESP32.

@jremington Do you have an idea if the sampling time will be less (faster) with this method than using the serial monitor to print the data

Also, will i be able to know the sampling time with method?

Use micros() or milis() to time it.

Do you have an idea

No. It depends on the serial Baud rate (which is not well defined for native USB serial implementations).

SPIFF's has been deprecated use LittleFS.

Did you use words like "save data using littlefs" in an internet search engine?

Seeming to beg for code will not produce the desired results.

What you do is try and then we will help. No try. No help.

Or you could pay someone.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.