0

I'm using a raspberry pi to control some relays hooked up to some lights. I am a controlling the lights via PHP web controls. I've reached a barrier in which there aren't enough GPIO pins to control all the lights I would like to. If I were to buy a second RPi, would it be possible to control it via the same page? I know basic HTML and I know I could just add a link that takes you to the second pi's IP address, but I would like to build a cohesive GUI in a single webpage.

Dave
  • 23
  • 4
  • 1
    You might be better to get a GPIO extender. There are chips which give access to many additional pins, and some of the Pi libraries have inbuilt support. e.g. https://raspberrypi.stackexchange.com/questions/10297/how-can-i-use-more-gpio-ports-on-the-raspberry-pi – Milliways Aug 17 '18 at 22:10

1 Answers1

1

Only you really understand what you mean by "but I would like to build a cohesive GUI in a single webpage."

My pigpio will let you control the GPIO of multiple Pis from a single location.

The pigpio daemon must be running on each Pi.

joan
  • 71,024
  • 5
  • 73
  • 106
  • pigpio is definitely the right answer! You have the choice between pigpio bindings in various languages (C, Python, nodejs, maybe others) - with Python, you can also use the gpiozero library (simple to use) with pigpio as the pin driver. See https://gpiozero.readthedocs.io/en/latest/remote_gpio.html – ben_nuttall Feb 27 '19 at 23:09