It's been a while since I touched an Arduino board. Since my last time doing this, I was using Windows XP. Now that it's 2026, let's review how it's now done using Linux and using a more recent Ethernet board.
The goal of this is to have a sensor connected to an Arduino UNO board. That board will use an Ethernet shield to communicate various hydroponic statuses to a Home Assistant dashboard. Due to the complexity of this task, touching many fields, this will be a multi-part posting.
Parts required
- Uno board (version 3)
- Ethernet shield - this batch of boards has a W5100 chip on it.
- arduino-ide_2.3.8_Linux_64bit.zip - Version of IDE that runs on Linux MINT.
- A network
Let's start at the very beginning. Set up the IDE environment in Linux so we can upload code to the Arduino board(s)
So, how do we program these boards? First, set up the MINT IDE. Using arduino-ide_2.3.8_Linux_64bit.zip Extract to a directory of same name. Inside directory, give the file called 'arduino-ide' executable permission. You will now be able to click on that file to start it.
Start the program. In program use pulldown menu
Tools > Board > Arduino AVR boards > Arduino UNO
Tools > Port > /dev/TTYUSB0 <-- or whatever your USB cable shows when connected.
Pick location of sketches by going to File>Preferences - select sketch location (browse button)
Do a first program test. Paste in the "blink" program below to the Arduino board. After pasting in....
Sketch > Verify/Compile
Sketch > Upload
/*
Arduino UNO - Blink Example
Blinks the built-in LED on pin 13.
LED ON for 1 second
LED OFF for 1 second
*/
void setup() {
// Configure the LED pin as an output
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
// Turn LED on
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
// Turn LED off
digitalWrite(LED_BUILTIN, LOW);
delay(4000);
}
Note, if using UNO board by itself, the LED onboard will blink. If using an Ethernet shield, the onboard LED won't light but an LED will light on the Ethernet Sheld board instead.
Let's walk before we run.... Let's have the Arduino serve a web page
We'll need to add in some additional Arduino commands. We do this by adding libraries. To do that, we'll need to add the correct ones based on the hardware we are using. The Ethernet shield I happen to have right now is the W5100 shield. This has built in features and even SDCard storage. Other cheaper less functional shields such as the ENC28J60 require the user to write code for more operations rather than use pre-made commends. This was done on my previous CDP reader project and it was painful. Since then, programming boards has become substantially easier.
Oh, and how do you find what board you have? It's not the lettering on the RJ47 port. That lettering only describes the port, NOT the type of shield it is. Instead, get a magnifying glass and look at the chip at the center of the shield. That will tell you what kind of board you have.
You can install premade libraries for shields through Arduino IDE → Tools → Manage Libraries. Some libraries are built into the IDE. Others need to be downloaded manually. The 5100 board is popular enough that you can do a search for 5100 and Ethernet_Generic library will be listed.

Let's try using some of those new commands provided by that library to set an IP and serve a webpage. If instead we published data in a machine friendly way, Home Assistant could poll and report that data into Home Assistant dashboard. In part 2 we will discuss how to do that.
#include <SPI.h>
#include <Ethernet.h>
// using Linux MINT environment with Arduino IDE GUI software
// Arduino-IDE_2.3.8_Linux_64bit
// Using UNO board
// Using Ethernet shield with Wiznet Ethernet W5100 chipset.
// using addition of built-in Ethrnet_Generic library added
// by going to Sketch > Manage Library > serching for Ethernet_Generic.
// And the code below.
// MAC address for the Ethernet shield
byte mac[] = {
0x02, 0x12, 0x34, 0x56, 0x78, 0x90
};
// Set an unused IP address on your network
// if it doesn't work immediately try pinging the address
// it is possible ARP cache may need to be created or cleared
IPAddress ip(192, 168, 1, 9);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);
// HTTP server on port 80
EthernetServer server(80);
void setup() {
Serial.begin(9600);
// W5100 chip select pin
Ethernet.init(10);
// Initialize Ethernet
Ethernet.begin(mac, ip);
// Start web server
server.begin();
Serial.print("Server IP: ");
Serial.println(Ethernet.localIP());
}
void loop() {
EthernetClient client = server.available();
if (client) {
Serial.println("Client connected");
bool blankLine = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
if (c == '\n' && blankLine) {
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connection: close");
client.println();
client.println("<html>");
client.println("<head><title>Arduino</title></head>");
client.println("<body>");
client.println("<h1>Arduino UNO Web Server</h1>");
client.println("<p>Web server is running!</p>");
client.print("<p>Uptime: ");
client.print(millis() / 1000);
client.println(" seconds</p>");
client.println("</body></html>");
break;
}
if (c == '\n')
blankLine = true;
else if (c != '\r')
blankLine = false;
}
}
delay(1);
client.stop();
Serial.println("Client disconnected");
}
}