Hi.
In my current project i have a datalogger storing 16 different sensorvalues from analogRead. I have no problem in reading and saving the to SD card. I have made start and stop datalogging with a simple high, low pin.
Every time i start logging i creates a new file and stores the data every 1 second for as long as the pin is high.
But what i would like, is to do some data processing with the stored data. I would like to find the minimum and maximum value of each sensor and some how store them in a buffer, ready for when i call for the values. I need to create a buffer with these values for every time i save a new collection of data.
Like this:
LOGGER00.csv follow by LOGGER00MINMAX.csv
LOGGER01.csv follow by LOGGER01MINMAX.csv
I hope you understand what i am trying to do.
But my question , how should i do it?
I have thinking about 2 different scenarios:
1: Hopefully there is some function/library which is capable of opening a .csv file and find min and max (statistic lib).
2: Create a parallel loop, which starts when i start datalogging, and thus compare is new value to the old value. And i the the end i have 16 Max values and 16 Min values which can be stored in a new csv file.
Which of the two is the best solution? Or is there something much simpler and smarter that what i have been thinking about?
I hope you can help me.
Best regards Bastian Gaardahl