a daemon as root • You can communicate to it with sockets (without root) • Lots of advanced GPIO features built-in • Accepts socket requests over the network, allowing remote GPIO capabilities • Remote GPIO works between two Pis, or from PC to Pi
import PiGPIOFactory from signal import pause ips = ['192.168.1.3', '192.168.1.4', '192.168.1.5', '192.168.1.6'] remotes = [PiGPIOFactory(host=ip) for ip in ips] leds = LEDBoard(2, 3, 4, 5) # leds on this pi sensors = [MotionSensor(17, pin_factory=r) for r in remotes] # remote sensors for led, sensor in zip(leds, sensors): led.source = sensor.values pause()
PiGPIOFactory from signal import pause ips = ['192.168.1.3', '192.168.1.4', '192.168.1.5', '192.168.1.6'] remotes = [PiGPIOFactory(host=ip) for ip in ips] button = Button(17) # button on this pi buzzers = [Buzzer(pin, pin_factory=r) for r in remotes] # buzzers on remote pins for buzzer in buzzers: buzzer.source = button.values pause()
who is home (ping known mobile phone IP addresses) • Pi with LEDs showing sensor data from other rooms • Pi with LEDs showing data from the internet (e.g. tube line info) • Control robot remotely from your PC • Use two HATs at once • Run the same script on multiple Pis from one control PC