Using pigpiod remotely
The Using pigpiod does not need to run on the same machine as the client code. If you must run the client application in a computer other than your Raspberry Pi you can:
Make sure the
pigpiod
daemon is running on the Raspberry Pi.Ensure that Dictel’s io1212 is connected to the GPIO port of the Raspberry Pi.
In your client code, when initializing the pigpio library using
pigpio_start
, specify a non-NULL
address, with the IP address or hostname of the Raspberry Pi.Optionally, specify the port where the daemon is listening.
For example, we can adapt the first pigpiod example (Example 1: Blink) to connect to a remote location by changing lines 31-32 as follows:
char *optHost = "192.168.1.250"; // IP address RaspberryPi connected to io1212
char *optPort = NULL;