How to connect two Arduino directly via Ethernet cable?
To create communication between two Arduino directly via Ethernet, we need to:
- Use two Ethernet shield
- Use a crossover Ethernet cable
- Config static IP for both Ethernet shield. Gateway of this shield is the IP address of other shield. For example
|Arduino #1 (Ethernet Shield)||Arduino #2 (Ethernet Shield)|
And then create a TCP connection between two Arduino: one Arduino acts as TCP server and the other acts as TCP client
For detail about TCP creation, please refer to communication between two Arduino via TCP