2

I have Two or more RPIs where one is places in a different building with a few buttons. The other has to get the value from the first and play a sound if one of the buttons is pushed on the first.

How do I get value that a button is pushed from the first RPI on the Second RPI? I'm new here.

Currently using Python. They are connected to my local Network and plaining to have more RPIs connected in different buildings.

Ghanima
  • 15,958
  • 17
  • 65
  • 125

2 Answers2

1

Use a RF422MHz module or NRF Module with both pi. Use the HT12D and HT12E as decoder encoder for networking. This is how you can do this.

Sohan Arafat
  • 1,852
  • 2
  • 12
  • 43
0

The pigpio Python module allows you to control and monitor the GPIO of multiple Pis over a network.

Each networked Pi must be running the pigpio daemon.

You can use raspi-config on Raspbian to enable the pigpio daemon (Interfacing Options -> Remote GPIO Enable/Disable remote access to GPIO pins).

The controlling Python script can be running on a Windows, Mac, or Linux machine, actually any machine which supports Python.

The same functionality is available from the Raspberry Pi Foundation's gpiozero Python module. See the chapters on Remote GPIO.

All the tools are pre-installed on full Raspbian builds. For Raspbian Lite you would need to download pigpio using the following commands.

sudo apt install pigpio python-pigpio python3-pigpio

joan
  • 71,852
  • 5
  • 76
  • 108