User Manual

chmod+xfilename
to grant the program the executable permission.
Operations and results
Shell program
Enter the Linux terminal, and input the following line: Execute the code:
pi@raspberrypi~/RPi_Relay_Board/shell$sudo./Relay.shCH1ON
Expected result: The LED of relay channel 1 is ON, and you can hear the relay closes. The two parameters at
the end of this line are configurable. For example, when you change these parameters to CH2 ON, the relay
2 will connect; and then to CH3 OFF, the relay 3 will disconnect.
pi@raspberrypi~/RPi_Relay_Board/shell$sudo./Relay.shCH2ON
pi@raspberrypi~/RPi_Relay_Board/shell$sudo./Relay.shCH3OFF
Bcm2835 program
Compile the program:
pi@raspberrypi~/RPi_Relay_Board/bcm2835$make
And execute the following line under the terminal:
pi@raspberrypi~/RPi_Relay_Board/bcm2835$sudo./Relay_Module
Expected result: Three LEDs light up by turns and the relays switch back and forth between the NC contacts
and NO contacts by turns. In the meantime, the terminal will show the contacts that the current relay stays
at.
Press the Keys Ctrl + C to end the program.
wiringPi program
Compile the program:
pi@raspberrypi~/RPi_Relay_Board/wiringPi$make
And execute the following line under the terminal:
pi@raspberrypi~/RPi_Relay_Board/wiringPi$sudo./Relay_Module
Expected result: Three LEDs light up by turns and the relays switch back and forth between the NC node