Skip to main content
2 of 3
added 36 characters in body
Lesto
  • 791
  • 3
  • 10

I'm assuming that you are using an Ethernet shield, as nothing about this is stated. But solution is really similar between many network solution.

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