-
Notifications
You must be signed in to change notification settings - Fork 9
PiFace Remoting
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, for the client side, create a new project and initialise 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.