ethernet+2 arduino

Hello,

I am from Spain and I started recently with arduino and I need your help. I want to control arduino by ethernet by another arduino: the first arduino has a temperature sensor and I want to activate a pin in the second arduino when the temperature is 20ºC. Like Master and Slave if I use SPI. The second arduino is going to be in other place.

Is it possible???

thanksssssssss

Is it possible???

Yes, it is...

Assuming,,, of course,,, that both Arduinos have Ethernet shields... Do they???

Multiple punctuation marks look silly,,, don'''t they???

Both have ethernet shield. So I think I need 2 IP, gateway, subnet, 2 MAC, my router public IP and I have to open a port in my router.

What would be the reading code for the digital pin?

client.read(digitalRead(3));

I know its bad, what I have to change?

thanks!

client.read(digitalRead(3));

I know its bad, what I have to change?

Everything you need to make it compile. The digitalRead() will, presumably, be done on the Arduino that acts as a server, so the data is sent to clients using client.print(), not client.read(). The client.read() method takes no arguments, and is used on the client to read what the server sent.