# Different pin out selection in flow based on pi model?

**URL:** <https://discourse.nodered.org/t/different-pin-out-selection-in-flow-based-on-pi-model/45125>\
**Category:** General\
**Created:** [3 May 2021 15:57 UTC](https://discourse.nodered.org/t/different-pin-out-selection-in-flow-based-on-pi-model/45125 "2021-05-03T15:57:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [3 May 2021 15:57 UTC](https://discourse.nodered.org/t/different-pin-out-selection-in-flow-based-on-pi-model/45125/1 "2021-05-03T15:57:04Z")

</div>

Different pin out selection in flow based on pi model? I have two flows, one defined for 40 GPIO pin Pi devices and another flow for 26 GPIO pin Pi devices. I want to merge the flows to one for all Pi devices. But I don't see a obvious way to set the GPIO assignment via the given GPIO node options.

I need on 40 pin Pi, GPIO out for pins 36,38,40,GND 34.  
I need on 26 pin Pi GPIO out for pins 19,21,23,GND 25.

I can't assign the same pins across both scenarios because pin assignment on the 40 pin Pi devices are already in use for other flows.

Is there a way to assign the GPIO pin assignment via flow logic rather than as static assignment via configuration edit node view for 'pi gpiod' out? I could just query the Pi device revision, then set the pin assignment accordingly, such is possible.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 May 2021 18:31 UTC](https://discourse.nodered.org/t/different-pin-out-selection-in-flow-based-on-pi-model/45125/2 "2021-05-03T18:31:26Z")

</div>

You can’t set them dynamically , but you can set them by environment variables so they can be set at deploy time.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [4 May 2021 04:42 UTC](https://discourse.nodered.org/t/different-pin-out-selection-in-flow-based-on-pi-model/45125/3 "2021-05-04T04:42:01Z")

</div>

Yeah, that appears to be the plan then. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 May 2021 04:42 UTC](https://discourse.nodered.org/t/different-pin-out-selection-in-flow-based-on-pi-model/45125/4 "2021-05-18T04:42:02Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
