Using 8 relay HAT #257
Unanswered
t4islander
asked this question in
Q&A
Replies: 1 comment 10 replies
-
ok, so quick update - I installed the relay_16 plugin and now when I run manually SO6 fires relay 4, SO7 fires relay 6, and SO8 fires relay 7 on my board. Is there somewhere I can update the GPIO mappings? I looked at the relay_16.py file and see the mapping there. I was thinking I could list the GPIO PINs I'm using there but I can't update the file, and don't know if I should. Any help much appreciated :) |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, starting with total newbie to this :)
I have a Raspberry PI that I have connected to a 8 relay output board, its a HAT I think because I have landed the RPi directly to the board. I'm able to toggle relays on and off using some pretty generic Python scripts but when I installed SIP and run the program none of the relays are activating. I have been using the following code to test with in Python as an example:
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(26, GPIO.OUT)
GPIO.output(26, GPIO.HIGH) #relay off
time.sleep(.5)
GPIO.output(26, GPIO.LOW) #relay on
time.sleep(10)
GPIO.output(26, GPIO.HIGH) #relay off
Is there a configuration somewhere I can change to use this board? I have GPIO PINs 5,6,13,16,19,20,21,26 that are working in my own Python but would rather not try to invent something that already exists and is really well built!
Beta Was this translation helpful? Give feedback.
All reactions