LED Control via Ethernet?

I have two Arduino UNOs, each with its own Ethernet Shield 2 installed. I am looking to connect both directly together with an Ethernet cable to control an LED. The first Arduino will have a pushbutton connected to it. When the button is pressed, an LED connected to the second Arduino will light up. Again, the only physical connection between the two Arduino boards is an Ethernet cable.

My guess is some form of communication system between the two boards, like board one sends a string/hex value to board two once the button is pressed. Board two recognizes the string/hex value it received and turns the LED on. Are there any simple examples of this that can be fairly easily modified?

Welcome to the forum

UDP messages would be able to do what you want but I believe that you will need a crossed Ethernet cable unless you connect the 2 Unos via a switch or a router

The UDP library has UDP examples

Welcome

Here is a tutorial to do exactly what you want.. https://arduinogetstarted.com/tutorials/communication-between-two-arduino

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.