# Push button to steering a few GPIO in sequence

**URL:** <https://discourse.nodered.org/t/push-button-to-steering-a-few-gpio-in-sequence/68932>\
**Category:** General\
**Created:** [12 October 2022 14:04 UTC](https://discourse.nodered.org/t/push-button-to-steering-a-few-gpio-in-sequence/68932 "2022-10-12T14:04:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aquapark\_lodz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aquapark_lodz/32/69828_2.png) [@aquapark\_lodz](https://discourse.nodered.org/u/aquapark_lodz)\
**Post date:** [12 October 2022 14:04 UTC](https://discourse.nodered.org/t/push-button-to-steering-a-few-gpio-in-sequence/68932/1 "2022-10-12T14:04:55Z")

</div>

Hi, I would like to know is it possible to steer a few GPIO in a sequence by push button. I made that but if I push the same button when the sequence is running I can again start the sequence. I want to achieve that to push button only once and then button is deactivated when the whole sequence is running. When it stops I can now push the button to start the sequence once again.  
The sequence is as follow:  
Push button starts first GPIO 26 ON for 5 seconds by trigger node and then GPIO 26 OFF and then GPIO 21 ON for 5 second and then GPIO 21 OFF - end sequence  
Please show me where the error is

 ![flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a518b09fc84aa072a5df13654626e227ddce519d.jpeg)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [12 October 2022 14:23 UTC](https://discourse.nodered.org/t/push-button-to-steering-a-few-gpio-in-sequence/68932/2 "2022-10-12T14:23:05Z")

</div>

> [@aquapark\_lodz](#):
>
> Please show me where the error is

Is it working correctly apart from the fact that the button is not disabled when pressed, and enabled again at the end? To do that you could use a node-red-contrib-simple-gate to block messages from gpio 20, fed from the first output of the first trigger to close the gate, and from the second output of the second trigger to open the gate again.

---

<div class="post-metadata">

**Author:** ![aquapark\_lodz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aquapark_lodz/32/69828_2.png) [@aquapark\_lodz](https://discourse.nodered.org/u/aquapark_lodz)\
**Post date:** [12 October 2022 14:35 UTC](https://discourse.nodered.org/t/push-button-to-steering-a-few-gpio-in-sequence/68932/3 "2022-10-12T14:35:06Z")

</div>

Thank you for your answer and yes in that state the sequence is working properly and I will do as you say about the gate.  
I have also another question about dasboard is it possible to put editable box when I can change the lenght time of each trigger? If so I can dynamically change each of times  
Finally I want to make one sequence with more than 10 gpio  
My goal is to steer relays with timers by gpio when i can make changes in triggers times by dashboard

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [12 October 2022 14:51 UTC](https://discourse.nodered.org/t/push-button-to-steering-a-few-gpio-in-sequence/68932/4 "2022-10-12T14:51:29Z")

</div>

> [@aquapark\_lodz](#):
>
> I have also another question about dasboard is it possible to put editable box when I can change the lenght time of each trigger

Yes, the help text for the trigger node describes how you can use msg.delay to set the delay time.

---

<div class="post-metadata">

**Author:** ![aquapark\_lodz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aquapark_lodz/32/69828_2.png) [@aquapark\_lodz](https://discourse.nodered.org/u/aquapark_lodz)\
**Post date:** [12 October 2022 15:11 UTC](https://discourse.nodered.org/t/push-button-to-steering-a-few-gpio-in-sequence/68932/5 "2022-10-12T15:11:57Z")

</div>

I'll give that a test tomorrow. Thank you!

---

<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:** [11 December 2022 15:12 UTC](https://discourse.nodered.org/t/push-button-to-steering-a-few-gpio-in-sequence/68932/6 "2022-12-11T15:12:33Z")

</div>

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