OpenSprinkler Forums OpenSprinkler Unified Firmware GreenIQ V2 hardware with OpenSprinkler Unified Firmware Reply To: GreenIQ V2 hardware with OpenSprinkler Unified Firmware

#60078

marekp
Participant

I checked OpenSprinkler source code, and find, that probably changes are nedeed in defines.h file, lines 448 to 461.
Probably I need redefine pin 22 – PIN_SR_LATCH, pin 15 – PIN_RFTX, and add 22 and 15 to PIN_FREE_LIST.
Next in OpenSprinkler App on phone I can define pin for each valve as GPIO from list of free pins.
But when I changed 22 and 15 to not used pins, after compiling program hangs.
Keyboard connected to RPi by USB doesn’t work, SSH doesn’t work.
Could anyone help, how I need to change pin config?
Below is part of GreenIQ sorce code in Python – initialization of GPIO:

.
.
.

# Initialize GPIO Ports
def init_gpio(self):
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
high_is = ‘1’
self.gpio_map = [7, 11, 12, 13, 15, 16, 18, 22, 26]
GPIO.setup(10, GPIO.IN) # Rain Sensor
for i in self.gpio_map:
GPIO.setup(i, GPIO.OUT)
GPIO.output(i, GPIO.LOW)
.
.
.

# Set flow sensor change detection gpio port
def detect_flow_sensor_gpio_changes(self, flow_count):
GPIO.remove_event_detect(10)
GPIO.add_event_detect(10, GPIO.RISING, callback=flow_count, bouncetime=0)
.
.
.