Raspberry PiRelay - The easy way to Switch Relays using the GPIO Pins on a Raspbery Pi. Control anything from 1 to 100 Relays connected to between 1 and 10 different RaspberryPi's. Instructions: 1. First run the following 4 commands on your RaspberryPi: sudo apt-get update. Sudo apt-get install wiringpi apache2 libapache2-mod-php -y. Sudo wget. Sudo mv gpio.