I am creating a project that where I log various parameters of data, e.g. in the form of values from a sensor connected to my Arduino Uno. I plan to visualize/graph the values following that.
But I want to store values extremely frequently because I want to track even very small changes in measurement, e.g., maybe even once every 500 milliseconds, in which case I will end up logging 173,000 values in 1 day.
The hurdle is that I can't think of an appropriate solution for storing so many values. If I write each value to an SD card or EEPROM, I will have tons of capacity but only have limited write cycles (only 100,000 to 300,000 cycles guaranteed at best according to the datasheet).
My best thinking so far involves using the Arduino RAM in combination with an SD card: Pseudocode: --Initially, on the Arduino RAM itself, define an array with a very large length, e.g. 1,000 elements. --Stack the first 1,000 measured values in the array on the RAM --When array fills up, group-write those 1,000 values together from the array to the SD card. --Then re-fill the array on Arduino RAM with the next set of 1,000 measured values --... and repeat (this way, I will only use a few thousands of write cycles to the SD card)
How would you guys approach, or how have you in the past approached, this type of problem? Or is my above solution the best option..