Skip to main content
1 of 3
Lesto
  • 791
  • 3
  • 10

i'm assuming you are using an Ethernet shield, as nothing abut this is stated. But solution is really similar.

Once a TCP connection has been established, it can be used like you would use the Serial;

you'll probably end up having something similar to:

[code] EthernetClient client = server.available(); //accept a new connection if (client) { //if valid connection client.print(distanceValue); client.close(); //close connection } [/code]

look at the official API reference for a more detailed list of available command.

Lesto
  • 791
  • 3
  • 10