For the third topic, we will learn how to send data to our ESP32 using an HTML form. In our case, we will input the data through a web server that displays three input fields.

Thanks to the clear explanation written on that page, we managed to do the project on this third topic very smoothly and finished it within a short amount of time!! :D

So, started with the wirings where we still used the same wirings as the two previous projects.

And here’s the code that can be found within the randomnerd page:

Note : Don’t forget to change the ssid and password based on your network credentials

After that, we uploaded the program into ESP32, opened Serial Monitor at the baud rate of 115200, and pressed the ESP32 EN button. The Serial Monitor will displayed the information about IP address needed to access the web server.

Then, I copied the IP address, opened Firefox, pasted it… and we’ll see something like below picture

I tried to type 123456 on input1, and submitted it. Here’s what happened next:

Save Input Fields to SPIFFS

Next, we will try to permanently save the inserted data on SPIFFS.

Here’s the code:

Note : Don’t forget to change the ssid and password based on your network credentials

Then I uploaded the program, opened Serial Monitor to find the ESP32 IP Address.

I tried to type “Mobobo” on inputString, and submitted it. What happened next:

I tried to type “3” on inputInt, and submitted it.

And for the inputFloat, I tried to type “18218.293235” and submitted it.

From above pictures, we can see that everytime we input new value and submit it, the current value will be updated.

Here’s the video:

Thank you for reading, and see you on another blog! 😄

Information System and Technology Student at Institut Teknologi Bandung.