Two communicating arduinos?

Dear all,

This is just a general question.

Is it possible to get two arduino's to talk to each other via TCP using an ethernet shield?

If so, would it be making one arduino a server and one arduino the client?

so maybe getting one arduino to client.read() What the other arduino has tcp'd

and then turning a pin on or off?

If not is there anyway of getting them to talk via tcp to turn pins on or off?

Kind Regards

Lewis

Is it possible to get two arduino's to talk to each other via TCP using an ethernet shield?

Yes.

If so, would it be making one arduino a server and one arduino the client?

Sounds like a good plan.

You can run both client and server code on an arduino, with the server waiting for request and the client making request upon some event.

Sorry to bother,

but how would i got about tcp messaging to turn a pin off and on, on another arduino.

Like if {client.read(turn pin 1 on) digitalWrite(pin1, HIGH);???

Kind Regards

Lewis

Look at the examples given for the Ethernet shield they show sample client and server examples.