# Combining two values

**URL:** <https://forum.xod.io/t/combining-two-values/1413>\
**Category:** Uncategorized\
**Created:** [November 23, 2018, 3:14pm UTC](https://forum.xod.io/t/combining-two-values/1413 "2018-11-23T15:14:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marty](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@marty](https://forum.xod.io/u/marty)\
**Post date:** [November 23, 2018, 3:14pm UTC](https://forum.xod.io/t/combining-two-values/1413/1 "2018-11-23T15:14:38Z")

</div>

I got again a thing that I couldnt get to work:

I have to inputs that send somehow values - a slider via bluetooth and a button which triggers a sinewave  
these two inputs should be merged to one output servo node

I dont wanna use both input values at the same time so I was thinking of a if-else that actos kind of a switch

I am receiving and got the values all right mapped - they both also work independently - but when I try to connect them together the end result is just a jittery servo that cant be controlled

any ideas ?

---

<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:** [November 23, 2018, 10:23pm UTC](https://forum.xod.io/t/combining-two-values/1413/2 "2018-11-23T22:23:31Z")

</div>

Sounds like the servo is switching between the two values. Does you protect just have a single servo node? If you have multiple nodes controlling the same servo it will not work unless you use a servo node with enable pin so that only one is active at a time. For your project, you should probably only have one servo node that uses an if-else or select to feed the correct value into it.

---

<div class="post-metadata">

**Author:** ![marty](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@marty](https://forum.xod.io/u/marty)\
**Post date:** [November 24, 2018, 9:00am UTC](https://forum.xod.io/t/combining-two-values/1413/3 "2018-11-24T09:00:55Z")

</div>

yeah started at first also with 2 servo nodes - that is a no go what I see  
I am currenty trying to get it work with one servo node and a if else to switch between the two inputs - but no luck so far 😉

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [November 26, 2018, 10:56am UTC](https://forum.xod.io/t/combining-two-values/1413/4 "2018-11-26T10:56:19Z")

</div>

> [@marty](#):
>
> I am currenty trying to get it work with one servo node and a if else to switch between the two inputs

This should do the trick 🤔 Would you share the xodball causing the problem?

---

<div class="post-metadata">

**Author:** ![marty](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@marty](https://forum.xod.io/u/marty)\
**Post date:** [November 26, 2018, 1:10pm UTC](https://forum.xod.io/t/combining-two-values/1413/5 "2018-11-26T13:10:37Z")

</div>

sorry that I didnt reply - yeah it did work like you said with an if-else acting as a “switch” and at the same time enabling the servo only when it receives values.  
My problem was - got the same Pin as the servo accidently mapped twice in the design - therefor it jittered alsways between theses values  
thanks for you great help !
