# Is there a node that acts opposite of the gate node

**URL:** <https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029>\
**Category:** Uncategorized\
**Created:** [December 6, 2019, 3:03pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029 "2019-12-06T15:03:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![uther2017](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@uther2017](https://forum.xod.io/u/uther2017)\
**Post date:** [December 6, 2019, 3:03pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/1 "2019-12-06T15:03:50Z")

</div>

I want to send a signal but have it break when it receives a pulse or a boolean. Ideally it would stay broken unless you reset the arduino or the program.

---

<div class="post-metadata">

**Author:** ![robertspark](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@robertspark](https://forum.xod.io/u/robertspark)\
**Post date:** [December 6, 2019, 3:34pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/2 "2019-12-06T15:34:13Z")

</div>

maybe try using a flip-flop?

---

<div class="post-metadata">

**Author:** ![uther2017](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@uther2017](https://forum.xod.io/u/uther2017)\
**Post date:** [December 6, 2019, 3:43pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/3 "2019-12-06T15:43:11Z")

</div>

Yeah I guess that would work if I used a gate to lock the flip flop into place and stop it from flip flopping. Actually I’m not sure if that would work because I dont think i can string a button and a gate to the same flip flop node

---

<div class="post-metadata">

**Author:** ![robertspark](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@robertspark](https://forum.xod.io/u/robertspark)\
**Post date:** [December 6, 2019, 3:46pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/4 "2019-12-06T15:46:03Z")

</div>

how are you going to trigger this device (flip-flop or any one of the gates)?

Do you have a sketch / schematic of what you are trying to do?

---

<div class="post-metadata">

**Author:** ![robertspark](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@robertspark](https://forum.xod.io/u/robertspark)\
**Post date:** [December 6, 2019, 3:51pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/5 "2019-12-06T15:51:13Z")

</div>

![2019-12-06 15_50_00-XOD IDE](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/c/c7fb85f411202aff15916f1ffbdf191182822f14.png)

just feed your latch input to the “reset” pin and it won’t set again (gate enabled) until the next reboot

---

<div class="post-metadata">

**Author:** ![uther2017](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@uther2017](https://forum.xod.io/u/uther2017)\
**Post date:** [December 6, 2019, 3:52pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/6 "2019-12-06T15:52:24Z")

</div>

I want to turn a led on and off at start up just by pressing a button but after holding the the button down for 2 seconds I go into adjustable brightness mode for the led and then when I let go of the button the brightness level stays at that and it will stay on that when I turn the light on and off. I got everything figured out except for how to turn initiate from start up mode to adjust mode. Basically I need to break the connection to start up mode forever when I enter adjust mode

---

<div class="post-metadata">

**Author:** ![robertspark](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@robertspark](https://forum.xod.io/u/robertspark)\
**Post date:** [December 6, 2019, 4:03pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/7 "2019-12-06T16:03:00Z")

</div>

This may be a useful library for you to use:

[https://xod.io/libs/hitec-tenshi/up-down-counter/counter/](https://xod.io/libs/hitec-tenshi/up-down-counter/counter/)

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [December 6, 2019, 4:08pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/8 "2019-12-06T16:08:08Z")

</div>

This sounds very close to what I did here: [Led options help](https://forum.xod.io/t/led-options-help/2976/10)

Quick button press turns on/off. 2 second press puts it in program mode to make it brighter/dimmer, then goes back to on/off mode. I used debounce node to determine when button has been pressed for 2 seconds.

---

<div class="post-metadata">

**Author:** ![uther2017](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@uther2017](https://forum.xod.io/u/uther2017)\
**Post date:** [December 6, 2019, 4:14pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/9 "2019-12-06T16:14:48Z")

</div>

You know what that might actually work. Right now I’m using a counter node and the problem is that the value starts at 0. With this I might be able to start the value off at maximum if I map range it.

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [December 6, 2019, 4:20pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/10 "2019-12-06T16:20:37Z")

</div>

If you want to stick with the counter node, you could subtract the counter value from 1 to get your “real” value. Counter will initialize to 0, 1-0=1 for your initial value. To make the “real” value bigger, dec the counter; to make it smaller, incr the counter. You still need to keep the counter in the 0-1 range…I felt that was easier using buffer & clip instead of counter (which would probably need gates on the incr/dec pins to avoid going beyond desired range).

---

<div class="post-metadata">

**Author:** ![uther2017](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@uther2017](https://forum.xod.io/u/uther2017)\
**Post date:** [December 6, 2019, 4:44pm UTC](https://forum.xod.io/t/is-there-a-node-that-acts-opposite-of-the-gate-node/3029/11 "2019-12-06T16:44:08Z")

</div>

Cool. Thanks for the advice
