I managed to set up a web server on the ESP32, great tutorial RN (https://randomnerdtutorials.com/esp32-web-server-arduino-ide/). I am developing a web page on the server to adjust and store settings into SPIFFS. These settings are then checked when the ESP32 boots up in Arduino mode; in Setup it opens the file in SPIFFS and gets the settings. I can make a web server, and in Arduino mode I can make a JSON file and store and read the JSON in a file in the SPIFFS. But I cannot read and then save the JSON file when the ESP32 is in server mode, can anyone provide the code that can specifically read and save a string in a file in the SPIFFS on the ESP32?
Hi.
Take a look at the following tutorial: https://randomnerdtutorials.com/esp32-esp8266-input-data-html-form/
Go to section number 2: “2. ESP32/ESP8266 Save Input Fields to SPIFFS”. The code contains functions to read and write to SPIFFS.
I think it’s exactly what you’re looking for.
Regards,
Sara