KanyonKris / relay_board

Relay board plugin for OSPi sprinkler control
12 stars 5 forks source link

Change Pins Used #6

Open wookienow opened 7 years ago

wookienow commented 7 years ago

Hi, Is there a way to change the pin mapping? I have an already wired system. Also is there a way to have active high for some pins and active low for other? Thanks

DarthKegRaider commented 1 year ago

wookienow,

If you haven't already tried this, I'd edit the .py file once on your raspberry. It's all out in the open, Just change the order/pins that suit your wiring. I would give it a go anyway.

define the GPIO pins that will be used

try: if gv.platform == 'pi': # If this will run on Raspberry Pi: GPIO.setmode(GPIO.BOARD) #IO channels are identified by header connector pin numbers. Pin numbers are always the same regardless of Raspberry Pi board revision. relay_pins = ["11","12","13","15","16","18","22","7","3","5","24","26"] pin_rain_sense = 8 pin_relay = 10

Or, take a look at the previous "Issues". Someone already asked that question and it was answered. https://github.com/KanyonKris/relay_board/issues/3