I have a Raspberry Pi 3b and wired to a 4 port relay I got from Amazon:
https://www.amazon.com/JBtek-Channel-Module-Arduino-Raspberry/dp/B00KTEN3TM/
Everything is working, but it seems backwards to me. First I set the modes to 'out' for all 4 of the GPIO ports I'm using. I'm using the following pins because they're close to each other on the pi, and issuing these commands to set up the ports properly:
gpio -g mode 26 out
gpio -g mode 13 out
gpio -g mode 6 out
gpio -g mode 5 out
From what I read, I should issue a '1' to turn them on, and a '0' to turn them off. But this seems to be reversed from what I'm seeing. If I issue a '1', nothing happens. If I issue a '0' they turn on. This turns them all on:
gpio -g write 26 0
gpio -g write 13 0
gpio -g write 6 0
gpio -g write 5 0
After that, I can issue a '1' to turn them off.
Is this normal behavior?