Hi,
I am actually working to save several measure into a SD card. I want to save it in JSON formar with Arduinojson library.
I am not very sure about how to save in a correct JSON format, as each measure loop must have a record. For example, the board measure each 10mn the temperature, the pressure, the humidity and tha altitude. When the measure is done, it must save the measures into the SD card
{"time":"2024-4-19 23:32:38","data":[{"temperature":21.21999931},{"pressure":936.6514282},{"altitude":658.1940308},{"altitude":100}]}
Next time, it does the save and the record are saved in the next line
{"time":"2024-4-19 23:32:38","data":[{"temperature":21.21999931},{"pressure":936.6514282},{"altitude":658.1940308},{"altitude":100}]}
{"time":"2024-4-19 23:32:49","data":[{"temperature":21.21999931},{"pressure":936.6514282},{"altitude":658.1940308},{"altitude":100}]}
...a dn so on
Is it consider as. a JSON format for you? I am asking this because I expected to have
[{"time":"2024-4-19 23:32:38","data":[{"temperature":21.21999931},{"pressure":936.6514282},{"altitude":658.1940308},{"altitude":100}]},
{"time":"2024-4-19 23:32:49","data":[{"temperature":21.21999931},{"pressure":936.6514282},{"altitude":658.1940308},{"altitude":100}]}]
with the [] and the , beween set of measure
I wonder, what you suggest to do it correctly?
Cheers