You will need:
- or an Arduino clone, as detailed here.
- Ethernet Shield (~$35) — make sure you get the version that matches your Arduino as they are not all compatible
- Spare port on router or switch and Ethernet cable
- WebServer example provided in Arduino app
The Ethernet shield uses pins with 10 to 13 to manage network connectivity, so don’t include them in your project; pin 4 is also used for the SD card, but we won’t be using that today.
First things first — open File -> Examples -> ethernet -> webserver, which is provided in the Arduino IDE. Find the lines referring to the MAC and IP address.
The MAC address for me was found on the box — yours may be on the shield itself. Adjust the first line of values - you need to leave the previous bit 0x . From a technical standpoint, it doesn’t matter what you put in here, as long as you don’t have conflicting values on your subnet — but even so, it was a manufacturer-assigned address, so we should probably stick with that. Just know that if you get it wrong, it will still work.
Edit the line labeled EthernetServer (number) and change the number to 8081 . This will configure our server to listen on port 8081 in case your ISP blocks web traffic on the traditional port 80.
Download the demo at this point and test it from your local machine. You will of course also need to connect an Ethernet cable. Keep the USB plugged in as we need it for power — you can change it to 9V later, but we’re still testing.