Can you provide more details?
Are you using a web server?
Where do you want to save the readings exactly?
On a file on your computer? On a database?
Thanks for the reply.
So we are both on the same page, let us say I am using example 3.1 Web Server: Display Sensor Readings (SSE) from your Build Web Servers book. I am using an ESP32 at the measurement point and using a laptop as the client to display the values. From your code new readings are received by the laptop as a JSON string in the EventListener function, so the laptop has access to the numbers. Somewhere about that point I would like to append those values to a file on the laptop’s hard disc that is collecting those values for later analysis.
It would be nice if a path and name could be entered to which the data would go, but I would be happy if it was a fixed path/name that could be later changed outside the client app.
Let me know if you need additional details.
That’s not as straightforward as it seems.
But, I recommend taking a look at Project 3.4.
It saves sensor readings on a file on the ESP32 filesystem. Then, you can check the raw data using the button “View Raw Data” on the web server. Then, you can then download/copy the data directly from your browser.
Even though this will probably work, I don’t think this is the best procedure if you’re looking for a datalogging project.
Let me know if you need further help.