Skip to content
Michael Clayton edited this page Jun 28, 2013 · 2 revisions

PiFaceSharp contains a PiFaceTcpClient and a PiFaceTcpServer class that allow client-side code to control a PiFace device on the remote server-side computer.

To use this feature, simply build and launch the Kingsland.PiFace.Server project and run it from a X-Terminal window on your Raspberry Pi (with a PiFace connected, of course). Then, create a new project and create a PiFaceTcpClient (instead of a PiFaceDevice) as follows:

var localEndPoint = new IPEndPoint(PiFaceTcpHelper.GetLocalIPAddress(), 43594);
var remoteEndPoint = new IPEndPoint(IPAddress.Parse(<serveripaddress>, 43596);
var piface = new Kingsland.PiFaceSharp.Remote.PiFaceTcpClient(localEndPoint, remoteEndPoint);

You can now program against the PiFaceTcpClient as you would do with a physical PiFaceDevice and it will send pin commands to the remote server for execution.

Clone this wiki locally