OpenSprinkler › Forums › OpenSprinkler Unified Firmware › GreenIQ V2 hardware with OpenSprinkler Unified Firmware › Reply To: GreenIQ V2 hardware with OpenSprinkler Unified Firmware
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
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:
# Set flow sensor change detection gpio port
def detect_flow_sensor_gpio_changes(self, flow_count):
GPIO.add_event_detect(10, GPIO.RISING, callback=flow_count, bouncetime=0)