Comments on: Arduino – Webserver with an Arduino + Ethernet Shield https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Mon, 06 May 2024 17:20:30 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Frank https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-913198 Mon, 06 May 2024 17:20:30 +0000 http://randomnerdtutorials.com/?p=1277#comment-913198 Thank you very much.
Wanted to do this to host a webpage for controlling the arduino.
But has problems, first being that code did not result in arduino being allocated ip address but another sketch with same ethernet code but no controls did host a simple page. ANSWER- my ethernet shield has a mmicro SD card reader on it- if not in use pin 4 has to be HIGH. So edited the sketch and sorted it.
Regarding the css, I reckon you could writre your own stylesheet (mystyle.css) and save it in the same directory as the .cpp file, and call it in the sketch by name with no path. This would let you customise your page BUT uses memory as the whole of the .css is uploaded with the sketch.

]]>
By: Pete Lämsä https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-873590 Wed, 22 Nov 2023 11:47:12 +0000 http://randomnerdtutorials.com/?p=1277#comment-873590 Hello!

Thanks for this tutorial! I tried it but for some reason when I press the ON or OFF buttons from the browser, I can only see that the led blinks quicly and then turns off. It doesn’t stay on.

Any ideas what’s going on? I have tried Chrome and Firefox.

Thanks,
Pete.

]]>
By: David https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-627661 Sun, 13 Jun 2021 22:54:23 +0000 http://randomnerdtutorials.com/?p=1277#comment-627661 Hi, is there anything for the ethernet shield but like the async Web Server for ESP?

]]>
By: Sara Santos https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-358066 Sat, 09 Mar 2019 12:27:31 +0000 http://randomnerdtutorials.com/?p=1277#comment-358066 In reply to Hafiy Danial.

Hi.
We don’t have any tutorials with what you want to do and without further information it is very difficult to understand what can be wrong.
You can take a look at this tutorial to see how to use the LCD display: https://randomnerdtutorials.com/arduino-display-the-led-brightness-on-a-lcd-16×2/
Regards,
Sara

]]>
By: Hafiy Danial https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-357473 Thu, 07 Mar 2019 00:30:07 +0000 http://randomnerdtutorials.com/?p=1277#comment-357473 ]]> hi there! nice project u got there. ik working on a project also. i just need some help. im trying to get my webserver to send text to a lcd 16×2 . i have the web server going but it seems the text cant be send to the lcd. ive tried many code from other websites. it seems not to work. pls help me 🤕

]]>
By: Sara Santos https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-357094 Mon, 04 Mar 2019 12:17:35 +0000 http://randomnerdtutorials.com/?p=1277#comment-357094 In reply to gian harvey b. candelario.

Hi.
We have other projects about web server, but they are very similar to this one.
What exactly do you want to do?

]]>
By: gian harvey b. candelario https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-357062 Mon, 04 Mar 2019 01:48:48 +0000 http://randomnerdtutorials.com/?p=1277#comment-357062 Hi, can you give us an example project where we can control any appliances using website but the code is in the server and send only instructions to the Arduino. we are very inspired about your tutorial and we want to learn more. thanks 🙂

]]>
By: Sara Santos https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-339537 Wed, 17 Oct 2018 13:11:50 +0000 http://randomnerdtutorials.com/?p=1277#comment-339537 In reply to Ben Cooper.

Hi Ben.
The readString variable saves the HTTP request. When you click the ON button, your browser sends an HTTP request that contains the “?button1on” expression.
In that if statement we are checking whether the readString variable contains that expression. The indexOf function will return -1, if it doesn’t find the expression on the readString variable. That’s why we use the “>0”.
If it returns a positive number, that means the string contains the “?button1on” expression, so we turn on the LED.
We have a more detailed explanation about how the web server code works on the ESP32 web server example. The code was built for the ESP32, but the explanations can be useful to understand the concepts.
Here’s a link for the tutorial:
https://randomnerdtutorials.com/esp32-web-server-arduino-ide/
I hope this helps.
Regards 🙂

]]>
By: Ben Cooper https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-339533 Wed, 17 Oct 2018 12:58:16 +0000 http://randomnerdtutorials.com/?p=1277#comment-339533 Could you please explain how this bit of code works?

if (readString.indexOf(“?button1on”) >0){
digitalWrite(led, HIGH);
}

I know what indexOf does, but can’t understand how this works!

Fantastic site, incredibly helpful!

]]>
By: Bit https://randomnerdtutorials.com/arduino-webserver-with-an-arduino-ethernet-shield/#comment-329640 Wed, 01 Aug 2018 00:03:40 +0000 http://randomnerdtutorials.com/?p=1277#comment-329640 The Arduino Ethernet Shield 2 allows an Arduino Board to connect to the internet. It is based on the winzet. Which provides both UDP and TCP.

]]>