# Switch node with loops until 1 of 2 conditions is met

**URL:** <https://discourse.nodered.org/t/switch-node-with-loops-until-1-of-2-conditions-is-met/51171>\
**Category:** General\
**Created:** [17 September 2021 16:12 UTC](https://discourse.nodered.org/t/switch-node-with-loops-until-1-of-2-conditions-is-met/51171 "2021-09-17T16:12:25Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [18 September 2021 02:04 UTC](https://discourse.nodered.org/t/switch-node-with-loops-until-1-of-2-conditions-is-met/51171/8 "2021-09-18T02:04:23Z")

</div>

Thanks for your help thus far. I am pretty sure I can set the topic of the current weight measurement ([here](https://discourse.nodered.org/t/split-string-into-text-and-integers/49889/4) is how I am parsing the data from the weight scale's serial output to a numerical value).

Before we get to the function, I am trying to understand how the Join node would incorporate the topics. I think something like this?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/6/b6a218e322b518ca1a30407436d5319d3a33af9f.png)

and also trying to understand the Trigger node. I think something like this? (btw, 5.5 represents the amount of volts that would be sent to the vibrator).

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/7996200b293c613ec69cbc9814ba05afa836f538.png)

---

_[View the full topic](https://discourse.nodered.org/t/switch-node-with-loops-until-1-of-2-conditions-is-met/51171)._
