# Is there a node for indexing

**URL:** <https://forum.xod.io/t/is-there-a-node-for-indexing/6648>\
**Category:** Uncategorized\
**Created:** [September 15, 2023, 8:07pm UTC](https://forum.xod.io/t/is-there-a-node-for-indexing/6648 "2023-09-15T20:07:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![g-p](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/g-p/32/1404_2.png) [@g-p](https://forum.xod.io/u/g-p)\
**Post date:** [September 15, 2023, 8:07pm UTC](https://forum.xod.io/t/is-there-a-node-for-indexing/6648/1 "2023-09-15T20:07:17Z")

</div>

Hi  
I am trying to resurrect an old 8 channel light string that I built for a Christmas display and controlled it with a C64 commodore. My plan is to cycle one nth node x number of times then take the reset pulse of the greater node and index to the next nth node. If there were only 2 nth nodes I would use a flip flop with a not nod to one of the them. As I am using the select node I need to pick the next enable input then recycle to start over at #1.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/8/8162bb567918f55f030980491c5ad5dcd09600e9.png)  
I have looked through the forum and libraries and couldn’t seem to see anything.  
any suggestions would be helpful

Thanks

---

<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:** [September 18, 2023, 2:04pm UTC](https://forum.xod.io/t/is-there-a-node-for-indexing/6648/2 "2023-09-18T14:04:40Z")

</div>

You want to cycle through all 4 values of the 1st nth-input x times, then cycle through all 4 values of 2nd nth-input x times, etc?

First you will need another count node to know how many times you have cycled through nth-input values.

Rather than use a select to choose which nth-input to use, using another nth-input would probably be a better option. Now you will need another count node to keep track of which nth-input you want to use.

Your first count node will cycle through each nth-input value. When it reaches max, you want to reset this count & increment the 2nd count, which is counting how many times you have cycled through nth-input. When the 2nd count reaches max, you reset it and increment a third count which changes which nth-input you are selecting.

If you want to change number of inputs for each nth-input, then you will need a way to specify max number for your first count node (another nth-input could be used for this). The same is true if you want to be able to change “x” for how many times you cycle each nth-input.

---

<div class="post-metadata">

**Author:** ![g-p](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/g-p/32/1404_2.png) [@g-p](https://forum.xod.io/u/g-p)\
**Post date:** [September 18, 2023, 3:56pm UTC](https://forum.xod.io/t/is-there-a-node-for-indexing/6648/3 "2023-09-18T15:56:40Z")

</div>

Gweimer  
Thanks to the reply. I think I might be on that same path, this is what I have so far. Some of the other routines need different length of nth nodes which added to challenge. It works.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/1/12483980897633777292eab5cda02f20e3a5e302.png)  
I have written in some comments, had to be loaded up onto a Mega as the uno’s memory is too small.  
Thanks again for the reply I appreciate any input  
g-p

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [October 18, 2023, 3:57pm UTC](https://forum.xod.io/t/is-there-a-node-for-indexing/6648/4 "2023-10-18T15:57:12Z")

</div>

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