Way to store data from sensors to ESP32

Hello everyone! I am working on an air quality monitoring project that uses various sensors to measure air quality and upload it to a cloud.

I need a way such that when connection to the cloud is unavailable, the ESP32 would be able to store data from sensors on its flash memory for uploading to cloud whenever connection is restored. Is this possible? What libraries can be used for this purpose? Are there algorithms on the internet available for this?

Thank you in advance

Probably easier to store it in RAM. Don't need any libraries: just use an array.

Yes.
Design a FIFO that is able to handle data structures for the dataset mentioned.

1 Like

RAM is different from flash memory right? Upon searching on the internet about storing data on esp32's ram, only ways to store data on flash memory is being presented. Can you provide a link or some kind of instruction on how to do this?

If you collect a large amount of data and frequently and you have a spare spi interface you might consider an external memory such as a SD card or FRAM module

Is it easier to write on those ezternal spi flash sd card than the flash memory of the esp32 itself?>

Do you have any idea what an array is?

ohh i get what you are saying now. Basically you want me to push the values measured by the sensors to an array directly via the code I made on arduino IDE and that would be automatically be stored on the RAM? Another question is what language does arduino IDE use, is it c or c++? sorry im kinda new on this.

One could use freeRTOS and a ringbuffer or Queue.

2 Likes

(previously mentioned by sumguy)
I recommend FRAM. Solves the blackout/brownout problems too.

1 Like

Okay I will consider buying 1. Thanks!

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