Comments on: ESP32 Web Server – Arduino IDE https://randomnerdtutorials.com/esp32-web-server-arduino-ide/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Mon, 07 Jul 2025 09:20:02 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sara Santos https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1065857 Mon, 07 Jul 2025 09:20:02 +0000 http://randomnerdtutorials.com/?p=36542#comment-1065857 In reply to John Page.

Hi.
I recommend following this tutorial now instead: https://randomnerdtutorials.com/esp32-web-server-beginners-guide/
The code is better optimized.

Regards,
Sara

]]>
By: John Page https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1065279 Sat, 05 Jul 2025 22:11:22 +0000 http://randomnerdtutorials.com/?p=36542#comment-1065279 Thank you! Very useful. I notice from the Serial port log that when a request is processed there is a slight delay, then it seems to get a new client again and then disconnect it. Why does that happen? I only click the button once.

]]>
By: Michael https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1046674 Thu, 22 May 2025 20:53:02 +0000 http://randomnerdtutorials.com/?p=36542#comment-1046674 hi Sara, I have question about the two button example. I created 10 buttons and when I click on the lowest one, I want that the next page goes down to last button I had clicked on, via html anchor or something. The problem with anchors is that they are not visible in the header via GET like below and so IndexOf can’t find #test1 . Do you have an idea how to fix this? Thanks in advance.

test1

New Client.
GET / HTTP/1.1

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1046434 Thu, 22 May 2025 08:39:39 +0000 http://randomnerdtutorials.com/?p=36542#comment-1046434 In reply to Chuck.

Hi.
Thanks for your feedback.
Currently, I recommend following this updated version of the tutorial instead: https://randomnerdtutorials.com/esp32-web-server-beginners-guide/

Regards,
Sara

]]>
By: Chuck https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1046259 Wed, 21 May 2025 16:01:51 +0000 http://randomnerdtutorials.com/?p=36542#comment-1046259 Hello, this tutorial did not work for me out of the box. It would just say “connecting to (SSID)……..” forever. I found in another of your tutorials (https://randomnerdtutorials.com/esp32-useful-wi-fi-functions-arduino/):

“If the ESP32 will connected to another network (access point/hotspot) it must be in station mode.

WiFi.mode(WIFI_STA);”

I added this on line 46 and now it works.

Old:
Serial.print(“Connecting to “);
Serial.println(ssid);
WiFi.begin(ssid, password);

New:
Serial.print(“Connecting to “);
Serial.println(ssid);
WiFi.mode(WIFI_STA); //This was not in the tutorial but is necessary for the ESP32 to connect.
WiFi.begin(ssid, password);

Maybe because I am using ESP32-WROOM-32 and this is for an older or different module? I’m not sure.

Anyway, thank you so much for providing this example, and for your other tutorials! Your work has made my work so much easier!

]]>
By: Tricky https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1032578 Wed, 30 Apr 2025 17:13:21 +0000 http://randomnerdtutorials.com/?p=36542#comment-1032578 In reply to Bob M..

A bit late to the party, but if it helps anyone else, you are hitting the captive portal for the Hilton hotel. All you need to do is log on to their portal (they probably want to harvest your eMail address and sign a waiver agreeing that any malicious activity is your fault, not theirs).

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1026856 Mon, 14 Apr 2025 08:45:56 +0000 http://randomnerdtutorials.com/?p=36542#comment-1026856 In reply to Gary Rubin.

Hi.
Yes.
You’re right.
We’ll update this tutorial soon.
Thanks.
Regards,
Sara

]]>
By: Gary Rubin https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1026763 Mon, 14 Apr 2025 01:53:51 +0000 http://randomnerdtutorials.com/?p=36542#comment-1026763 Worked great for me and well explained! On an ESP32S3-N32R8 ESP32-S3-KitC-WROOM2 v1.1.
I tried this a few months ago and my device panics and went into an endless error state. I think they updated something at Espressif because it works now. It was posted “Why not an ESP-01?” I want room for a more involved web interface in SPIFFS, and the ESP32 is a lot more powerful.
Such a great tutorial THANKS!
So if I may suggest… in the code, not everyone will be able to use the GPIO pins you used in this code. They should be set as constants so people do not have to change them throughout the code. And variable names like output26State should maybe be outputLED1State and outputLED2State, etc. Because you are working with 2 LED’s, and how they are routed should be left to the constant, as in outputLED1gpio or something like that. My 2 cents worth. THANKS!

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1024091 Sun, 06 Apr 2025 09:48:03 +0000 http://randomnerdtutorials.com/?p=36542#comment-1024091 In reply to Mike_MCS.

Hi.
If you want to use this example without the web page, but still respond to incoming HTTP requests, you can remove all the HTML text and keep just the parts where you handle commands like GET /26/on or GET /27/off.
Regards,
Sara

]]>
By: Mike_MCS https://randomnerdtutorials.com/esp32-web-server-arduino-ide/#comment-1023485 Sat, 05 Apr 2025 16:35:09 +0000 http://randomnerdtutorials.com/?p=36542#comment-1023485 This is very close to my needs, but I need it to listen for input from the LAN to turn on and off pins. Maybe either UDP or HTTP data.
I don’t need the web page, but it could be handy for testing.

Planning to replace some of my KASA devices that my Hubitat controls with ESP devices that could manage more than one device at a location based on the packet received.

]]>