Hellow every one
I have multi arduinos and i want create a web server with them via Ethernet.
How can server identify multi IP of clients ?
can you help me for do this ?
What Arduinos are you using?
How do they connect to the Ethernet?
Generally just one of them would behave as a server.
Personally I would use a Yun for that and create the server on the Linux side with Python. But a RaspberryPi would be cheaper if you don't need the Arduino side of the Yun.
...R
hadise:
How can server identify multi IP of clients?
When a client connects and sends a request the server.available() call returns a 'EthernetClient' object which contains the client IP address and port number.
void loop() {
// listen for incoming clients
EthernetClient client = server.available();
if (client) {
Use that 'client' object to send characters to the client and those characters will be sent to the right IP address and port.
How can server identify multi IP of clients ?
If the IP address is going to be used to identify the client, it might be easier to just put a client identifier in the data sent by the client.
Robin2:
What Arduinos are you using?How do they connect to the Ethernet?
Generally just one of them would behave as a server.
Personally I would use a Yun for that and create the server on the Linux side with Python. But a RaspberryPi would be cheaper if you don't need the Arduino side of the Yun.
...R
I have 3 UNO boards and ethernet shields .