Is it possible to connect two Ethernet shields to arduino? And if yes, how can I distinguish them in the code?
3
-
1You need to move the SS pin for one of the shields (Arduino pin 10). That way you can select which shield you want to talk to. – Gerben Jan 8 '15 at 19:11
-
I don't think you can do this because the Ethernet.begin statement isn't an instance of Ethernet so I don't think you can do this. – unknowndomain Feb 2 '15 at 23:37
-
3Technically it is possible. Maybe you will have to write your own library. But... Why? Why do you need two ethernet shields? I'm pretty sure the main problem is another one... Please tell us what you really want to achieve, so smarter solutions can be suggested (see The XY Problem). I'm telling you this because even if you have two shields you won't be able to do much work with them... – frarugi87 Jan 25 '17 at 10:16
Add a comment
|
The ENC28J60 Shields have a Chip-Select-Pin (CS) so you could select between the two shields with this.
I'm using the EN28j60 with the Ethercard library and I'm not sure if this could handle two Ethernet shields because you have to set the CS pin at init on the first call in the function, and can't change it at runtime.
-
1