# Wishlist for new nodes

**URL:** https://forum.xod.io/t/wishlist-for-new-nodes/118
**Category:** Uncategorized
**Created:** [October 4, 2017, 9:31pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118 "2017-10-04T21:31:38Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 4, 2017, 9:31pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/1 "2017-10-04T21:31:38Z")

</div>

My personal wishes for new nodes:

Option for activating pull-up resistors on digital inputs

Counter:  
Inputs for clock, upper limit, lower limit, counting up, counting down, reset.  
Output: value  
Stops and holds min. / max. value when reached.

Test if in range:  
Inputs: value, set min value, set max value.  
Boolean output: in range / out of range.

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 5, 2017, 3:06pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/2 "2017-10-05T15:06:49Z")

</div>

Two-Phase Incremental Rotary Encoders  
(e.g. Alps EC11 E09244A; with debounce) 😋

---

<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: [October 6, 2017, 8:30am UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/3 "2017-10-06T08:30:59Z")

</div>

> [@dox](#):
>
> Counter:
> 
> Inputs for clock, upper limit, lower limit, counting up, counting down, reset.
> 
> Output: value

Reasonable. Do you think the node should have a `STEP` parameter? In any case, even if the `STEP` is hard-coded to 1, what should happen if the lower limit is -1.5 and the upper limit is +1.5. The current value is 1, we pulse on `INC`… what the output value should be after that?

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 6, 2017, 3:02pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/4 "2017-10-06T15:02:38Z")

</div>

Yes, please. A STEP-parameter. Of course. I forgot to mention.  
There is always a 74192 BCD-counter in my head… 🤪  
My target is to count from 0 up to 1 in 0.001 steps.

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 6, 2017, 3:05pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/5 "2017-10-06T15:05:19Z")

</div>

More wishes:

if-else-string  
Inputs: Condition (boolean), True string, False string  
Output: String

“Clear screen” for the text-lcd-16x2 node

Serial Interface (with hardware handshake would be perfect 😋 )

---

<div class="post-metadata">

### Author: ![awgrover](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@awgrover](https://forum.xod.io/u/awgrover)
#### Post date: [October 7, 2017, 5:04pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/6 "2017-10-07T17:04:19Z")

</div>

> [@dox](#):
>
> Test if in range:
> 
> Inputs: value, set min value, set max value.
> 
> Boolean output: in range / out of range.

You can build this out of standard nodes. [in-range-nodes.xodball](https://forum.xod.io/uploads/xod/original/1X/1290177ed3b8ed052bee27a45932f0a941c92a97.xodball) (6.6 KB)

But, it offends my sense of efficiency, because all the nodes will fire for each calculation (no short-circuiting). Is it good enough for you purposes?

 ![in-range](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/c0384ef81c1efc407ef28a1ac79a6897eec15624.png)

> [@dox](#):
>
> if-else-string
> 
> Inputs: Condition (boolean), True string, False string
> 
> Output: String

Added to my node lib as awg/logical/if-else-string

> [@dox](#):
>
> Option for activating pull-up resistors on digital inputs

Added to my node lib as awg/hardware/digital-input. But, not tested with actual hardware yet!

---

<div class="post-metadata">

### Author: ![awgrover](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@awgrover](https://forum.xod.io/u/awgrover)
#### Post date: [October 8, 2017, 1:48am UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/7 "2017-10-08T01:48:02Z")

</div>

Added awg/logical/string-compare to my library of nodes. Compares 2 strings, has 3 outputs: less, eq, greater. Only one output will go true. Recalculates if any input changes. [https://github.com/awgrover/xod\_lib](https://github.com/awgrover/xod_lib)

This likely doesn’t work all the time. It looks like the strings in XOD may have some bugs, but maybe the bug only happens when you “concatenate” strings.

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 8, 2017, 8:58pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/8 "2017-10-08T20:58:24Z")

</div>

Hello awgrover,  
thanks for the new nodes! I have tested if-else-string an it works fine. digital–input is not tested yet, because it is late and my soldering iron is far away. At this time hardware has pull-ups.

Yes, test-if-in-range can be done by standard nodes. Did this patch use more memory than a standard node from the library?

---

<div class="post-metadata">

### Author: ![awgrover](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@awgrover](https://forum.xod.io/u/awgrover)
#### Post date: [October 8, 2017, 9:40pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/9 "2017-10-08T21:40:52Z")

</div>

> [@dox](#):
>
> Yes, test-if-in-range can be done by standard nodes. Did this patch use more memory than a standard node from the library?

I don’t understand. Do you mean by “standard node” something build in c++ rather than built out of other nodes? Then, yes, it uses a lot more memory, and is a lot slower.

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 9, 2017, 7:56am UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/10 "2017-10-09T07:56:36Z")

</div>

> [@awgrover](#):
>
> I don’t understand. Do you mean by “standard node” something build in c++ rather than built out of other nodes? Then, yes, it uses a lot more memory, and is a lot slower.

Some nodes come with XOD IDE by default (in the folder xod/ in the menu on the left). I think more memory is used when I create a new patch made with these standard nodes from the menu instead of using a node from this menu which is “ready to use”. Even if the have absolutely the same function.

---

<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: [October 9, 2017, 10:00am UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/11 "2017-10-09T10:00:07Z")

</div>

Let’s make the terminology clear.

The first dimension: **Native vs Patch nodes**

Patch nodes are created in XOD itself by composing existing nodes (no matter which ones). The `test-if-in-range` by @awgrover is a patch node.

Native nodes are implemented in C++ from scratch and, yes, they’re more resource-efficient than patch nodes because they skip cross-node communication overhead. Although it’s likely always would be a penalty for patch nodes, we strive to make the difference as low as possible. @awgrover have native nodes in his library as well.

The second dimension: **Standard vs Community nodes**

Nodes are done by users. It doesn’t matter whereas they are native or patch nodes, they belong to someone. The standard nodes are simply nodes by the user `xod`. It doesn’t affect efficiency anyhow.

BTW. Node requests are very reasonable. We’ll do it. For now, you can do what you need by yourself or use other’s nodes.

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 10, 2017, 11:07am UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/12 "2017-10-10T11:07:00Z")

</div>

Wish for nodes:  
like “nth-number-x” but strings instead of numbers as in- and output

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 12, 2017, 4:02am UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/13 "2017-10-12T04:02:07Z")

</div>

> [@awgrover](#):
>
> Added to my node lib as awg/hardware/digital-input. But, not tested with actual hardware yet!

Hello awgrover, I made a test with my arduino uno. The node works fine (tested on pins 2, 3, 8, 9). Thanks a lot for your support!

---

<div class="post-metadata">

### Author: ![awgrover](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@awgrover](https://forum.xod.io/u/awgrover)
#### Post date: [October 13, 2017, 8:48pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/14 "2017-10-13T20:48:05Z")

</div>

> [@dox](#):
>
> Counter:
> 
> Inputs for clock, upper limit, lower limit, counting up, counting down, reset.
> 
> Output: value
> 
> Stops and holds min. / max. value when reached.

Added to my libs in [github](https://github.com/awgrover/xod_lib) as awg/count/limited-counter.

- Counts up or down depending on STEP
- Never exceeds MIN or MAX
- Can change MIN/MAX/STEP at any time.
- Counts up/down only on INC
- Only outputs if the OUT actually changes. E.g. you can set the STEP to 0, and you’ll not see any OUT because OUT doesn’t change.
  - but, if you change MIN, and OUT is currently less than that, you’ll see output. E.g. if OUT is at 10, and you set MIN to 20. OUT will change to 20.

The behavior is a bit complicated in the details:

- Starting with MIN as the first OUT value
  - STEP is positive
  - RST must have a pulse on the first transaction (or rather, with the first INC). Otherwise, INC will add STEP and you won’t see MIN.
  - So, RST is set as “on boot” as default. And RST inhibits INC. You could also ensure that RST receives a pulse at the same time or before the first INC pulse (e.g. both on the same initial pulse).
  - This seems like a hack.

- Starting with MAX as the first value:
  - same as above, except STEP is negative

- RST will reset you to MIN or MAX depending on STEP. If you are counting up (STEP is positive), you reset to MIN. Counting down, you reset to MAX
- The last value of OUT may not be a complete STEP. E.g.
  - OUT is 18
  - STEP is 3
  - MAX is 20
  - The next INC will make OUT = 20. Because we never exceed MAX. That’s only +2, not +3.

- Rounding accumulates
  - I set the defaults of this node to count from 0…1 in 255 steps. This was to make it instantly usable with a PWM LED (the LED node).
  - But converting to 0…255 by \*255 and rounding makes the last 2 values 253.99944120 and 254.99943900. But, those are supposed to be 254 and 255.
  - I ended up tweaking the step to 0.00392157, so that conversion to integer would give 254, 255, etc.

---

<div class="post-metadata">

### Author: ![awgrover](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@awgrover](https://forum.xod.io/u/awgrover)
#### Post date: [October 13, 2017, 8:57pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/15 "2017-10-13T20:57:51Z")

</div>

> [@dox](#):
>
> Wish for nodes:
> 
> like “nth-number-x” but strings instead of numbers as in- and output

You could probably make this out of cascading if-else-string’s. It may be interesting for you to think about. something like:

 ![nth](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/a19fb98782775785590de8bc82c6ca0ba246016f.png). Maybe that shouldn’t be nand.

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 14, 2017, 7:17pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/16 "2017-10-14T19:17:30Z")

</div>

Thanks! Thanks! Thanks!  
Now it is easy going to finish my project “3-Button LED Dimmer”:

![Zwischenablage02](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/fa482069774e9cc4677e9fbfb0e76cec5d11c525.jpg)

This counter-node is very versatile to use. Great work!

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 14, 2017, 7:37pm UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/17 "2017-10-14T19:37:55Z")

</div>

> [@awgrover](#):
>
> You could probably make this out of cascading if-else-string’s. It may be interesting for you to think about.

Yes, I made a few tests in the last days (cascading if-else and if-else-string nodes). I have some problems after uploading and debugging my project. I didn’t get an error message but debugging hangs and arduino will not work. Don’t know why. The project has lots of patch-nodes and after removing one third of the nodes the rest works fine. It takes also a lot of time until the upload screen (green timeline) appears. After removing some nodes upload starts faster. Perhaps my patch-nodes need too much of the resources? Because the project is in an early stage and im still plaing around, I will not upload it. Perhaps I will not need all the functions I have implemented yet. I have to think about it first.

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 20, 2017, 7:47am UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/18 "2017-10-20T07:47:00Z")

</div>

> [@awgrover](#):
>
> You could probably make this out of cascading if-else-string’s.

I tried it this way:

![Kaskade](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/2d7e1c50d6c8b60dcb0d9e8601cc5e93548fd83f.jpg)

In interaction with the whole project Arduino hangs after uploading. I used also a lot of patch nodes:

 ![Projekt](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/cb1e865d65117c3a24a6f811ebad78d546ec637c.jpg)

Perhaps the whole project was too complex. Now I tried it this way and it works:

 ![Works](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/fbc7fc6c9a787c80633d5b9a64ad55eac26b94ac.jpg)

The whole thing reads the analog output of a HEITRONICS Infrared Thermometer. The value is send to the LCD. You can set the temperature range and the output from 0 - 20 mA to 4 - 20 mA. Perhaps there will be a more comfortable menu control (with incremental decoder?) in future and some more features (0 - 1 V / 0 - 10 V input, min. / max. Alarm, more acurate measurement with activated external reference voltage, over / underflow alarms, stored menu settings, temperature logging, ambient temperature and humidity readings… 🤩 )

---

<div class="post-metadata">

### Author: ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)
#### Post date: [October 20, 2017, 7:52am UTC](https://forum.xod.io/t/wishlist-for-new-nodes/118/19 "2017-10-20T07:52:16Z")

</div>

Hello developers, if possible please implement a few nodes for MIDI stuff:

Send program change messages  
Send control change messages  
Send note on / off

Don’t be afraid if I will not write in the next time. I will be off for the next four weeks. 😥
