This quick video shows how you can connect the pins on two different devices, in this case Raspberry Pis, to each other using connections made in software.
This is done with a Raspberry Pi Model B and a Raspberry Pi 2 Model B but these could be done with Beagle Bone Blacks, Orange Pis etc.
More information and a walk-through can be found at
http://nodecode.io
Hardware Used:
Push Buttons
http://amzn.to/2ajjgmK
LEDS
http://amzn.to/2ajjsTb