OpenSprinkler Forums OpenSprinkler Unified Firmware How to Change sensor1 flow sensor input pin on pi zero2w ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #78122

    ronnie
    Participant

    I’m using the pi zero 2w GPIO pins to drive my own valve control circuitry. I want to use one of the GPIO pins for a flow sensor input. Am I correct in assuming changing #define PIN_SENSOR1 pin 14 to something else in Defines.h is all that is necessary?

    #elif defined(OSPI) // for OSPi

    #define OS_HW_VERSION OSPI_HW_VERSION_BASE
    #define PIN_SR_LATCH 22 // shift register latch pin
    #define PIN_SR_DATA 27 // shift register data pin
    #define PIN_SR_DATA_ALT 21 // shift register data pin (alternative, for RPi 1 rev. 1 boards)
    #define PIN_SR_CLOCK 4 // shift register clock pin
    #define PIN_SR_OE 17 // shift register output enable pin
    #define PIN_SENSOR1 14

    #78126

    ronnie
    Participant

    I see now that “#define PIN_SENSOR1 14” does not actually refer to a physical pin. It refers to the header pin named GPIO 14 which is header pin 8.
    So, am I correct in assuming changing #define PIN_SENSOR1 “GPIO” 14 to something else in Defines.h is all that is necessary?

    #78130

    Ray
    Keymaster

    The GPIO pin always refer to GPIO pin, it does NOT refer to positional pin. Generally we don’t use positional pin because that’s not how pins are referred to in a program. Please check the OpenSprinkler Pi user manual for details.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware How to Change sensor1 flow sensor input pin on pi zero2w ?