# Need help with a one shot trigger

**URL:** <https://discourse.nodered.org/t/need-help-with-a-one-shot-trigger/29488>\
**Category:** General\
**Created:** [4 July 2020 09:18 UTC](https://discourse.nodered.org/t/need-help-with-a-one-shot-trigger/29488 "2020-07-04T09:18:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rog\_Red](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Rog\_Red](https://discourse.nodered.org/u/Rog_Red)\
**Post date:** [4 July 2020 09:18 UTC](https://discourse.nodered.org/t/need-help-with-a-one-shot-trigger/29488/1 "2020-07-04T09:18:07Z")

</div>

Hi There,

I'm hoping for some help..

I need a set a GPIO pin high for 1 second, then low, triggered by a payload "1".  
Subsequent payload "1"s should have no effect until a payload "0" is received which then enables the next "1" to trigger the pin once more. Basically it is a one-shot trigger reset by a "0"  
I've searched everywhere but found nothing quite like that. Unfortunately my JSON skills are not so good.. I'm still learning 🙂

Cheers.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [4 July 2020 09:25 UTC](https://discourse.nodered.org/t/need-help-with-a-one-shot-trigger/29488/2 "2020-07-04T09:25:13Z")

</div>

Hi  
Have a play around with the trigger node (and might need a switch node and a change node as well)

If you can't manage to get it do do what you want it to do - come and paste your attempt here and we can try and point you in the right direction 🙂

---

<div class="post-metadata">

**Author:** ![Rog\_Red](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Rog\_Red](https://discourse.nodered.org/u/Rog_Red)\
**Post date:** [4 July 2020 09:34 UTC](https://discourse.nodered.org/t/need-help-with-a-one-shot-trigger/29488/3 "2020-07-04T09:34:04Z")

</div>

Ah.. thanks.. you got me thinking of 2 trigger nodes one after the other. I was trying to achieve that with a function but two sequential trigger nodes did the trick. Thanks!

---

<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:** [2 September 2020 09:34 UTC](https://discourse.nodered.org/t/need-help-with-a-one-shot-trigger/29488/4 "2020-09-02T09:34:05Z")

</div>

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