Introduction: Make a Web Server Using Arduino
This Instructable is also available on Jordan's Lab Notebook
Today, we will make an arduino-based web server using the Ethernet Shield.
Lets take a look what we need:
1. Arduino Ethernet Shield
2. Arduino Uno
3. A Ethernet Connection Wire
4. A Ethernet connection (from a router)
5. Arduino USB cable (for writing codes to the board)
1. Connect the Ethernet Shield and the Arduino Uno.
2. Plug in the Arduino USB Cable to the board and the computer. The led on the board should light up.
3. On the computer, open Arduino IDE.
4. Open: File > Examples > Ethernet > WebServer
5. Change IPAddress ip(192,168,1,177); to IPAddress ip(192,168,0,177); and change EthernetServer server(80); to EthernetServer server(8081); to prevent conflicts.
6. Click the button to upload the code to the board.
7. Connect the ethernet cable to the arduino board and the router.
8. Navigate your browser to http://192.168.1.177, you should see the following:
You now have your web server in your own network!
In order to make your site visible to the public, you need port forwarding!
1. Open your router's configuration page, for example, my tp link router's link is tplinklogin.net.
2. Click on Forwarding (or Port Forwarding, Ports, etc, based on your router) from the menu.
3. Click "Add new"
4. Type in the following:
5. Click "Save".
6. Navigate to www.whatismyip.com
7. The IP Address shown on the website is the address of your website, for example, my address is 18.104.22.168, so my web server's website is 22.214.171.124:8081
You can now call your friends to test your website!