Introduction: Arduino Web Server

This project uses an Arduino ethernet shield to serve up a webpage to your router. When you connect to that webpage with your computer or mobile device, you can control the LED on the breadboard. Lets get started. (Update: The code and schematic came from Rui Santos at )

Step 1: Parts

For this build you will need:

1x Arduino Uno R3 RadioShack

1x Arduino Ethernet Shield Amazon

1x Breadboard RadioShack

1x LED RadioShack

1x 220ohm Resistor RadioShack

You will also need:

Ethernet Cable Amazon

USB A to USB B Cable Amazon

Arduino IDE

Hookup Wire

Step 2: Easy Assembly

Connect the ethernet shield to the Arduino by simply lining up the pins and pushing it in. Connect the led + pin to pin 3 on the Arduino. Connect the led - pin to the 220 ohm resistor. Connect the other end of the 220 ohm to the Arduino's GND. Use the image to help.

Step 3: The Code

This is the code for the project. The gateway, ip and subnet need to be changed to match you network. The MAC needs to be specific to the Arduino but do not change the "DE" at the beginning. Make sure no other device is using that MAC. (Update: Modified code to give credit to original creator.)

Step 4: Testing and Trobleshooting

When you connect to the webpage at, you should see the same as the image above. If the page doesn't load, push the RESET button on the Arduino and try again. If it still not working, check the gateway, the routers address, the subnet, and the MAC. If it does load, when you click lamp on, the led should come on. If not, check that the LED's longer pin is connect via hookup wire to Arduino pin 2. If anything is still not working, feel free to leave a comment.


AmmarY4 made it!(author)2016-06-17


RobDeVoer made it!(author)2016-06-16

Great project, thanks for sharing

Linesmen made it!(author)2016-04-09

I am not sure what you ment ? Arnt you still in LAN not in WAN?

Can this be all ? I am still Curius! can you Please explain more about It ?

"In the code, change the port 80 to 8081.

When you connect on the browser, enter this: (Arduino IP)Dot(Port)

If you have any issues, please let me know."

If you have any issues, please let me know."

diytransistor made it!(author)2016-04-12

For LAN, keep the configuration that is in the code. If you would like to set it up for WAN, change the code and setup port forwarding as I described in other comments.

Linesmen made it!(author)2016-04-09

i made It !

Thanks ! it was a intresting and nice tutorial.

I am not to good in english language but i try my best!


diytransistor made it!(author)2016-04-10

No problem, hope you like it!

diytransistor made it!(author)2015-11-09

The port forwarding should be setup like this:

Lan IP: or Whatever your Arduino's IP is.

Protocol: TCP/UDP

Ports Forwarded: 8081

Remote Ports: 8081

In the code, change the port 80 to 8081.

When you connect on the browser, enter this: (Arduino IP)Dot(Port)

If you have any issues, please let me know.

diytransistor made it!(author)2015-12-05

This would work anywhere in the world as long as you have internet connectivity.

thom123 made it!(author)2015-11-07

how change code to make that from other internet conection people could connect ? port fowarding already done

smandal13 made it!(author)2015-08-18

nice instructable

Volthaus+Electronics+Laboratory made it!(author)2015-08-16

Very good work. And your server can be connected to from anywhere in the world without using some third-part website! Here's an example of the temp and humidity at workshop

DIY+Hacks+and+How+Tos made it!(author)2015-08-16

Cool project.

About This Instructable




Bio: I am a diy fanatic. I love to build electronics and play with computers. Me and my friends build projects together all the time. It ... More »
More by diytransistor:Binder Clip Life HacksArduino Web Server
Add instructable to: