Saving value and loading values?

Hi. I have a small project, where I have several pots connected to a multiplexer. The values go to the arduino, and then go out again, via a demultiplexer.
I want the arduino to be able to manage presets of pot positions.

So:
I want to be able to save the state of the pots in a preset manager.

Then I want to be able to select X preset and load that preset output the saved values via the demultiplexer.
How would i go about that?

the multiplexing/demultiplexing is already working.

Thanks!

I think what you need is where to save variables, this can be useful for you. Data latch type nodes

I would like to store many presets. Not sure this could help. I need some sort of array or something. Anything like that in XOD?
:slight_smile:

you can put several gate () or latch, send a pulse to each one at the moment you need. then you can connect the outputs to dataselect (add cesars/4067 ) or make any other configuration

makes sense. I’ll experiment:)

Don’t know how you plan to assign values to your presets. If you want to push/pop values onto a stack, gweimer/utils has a queue-buffer.

Since you can select different “sets” of values to send, you probably need need to use a select
or nth-input node for each value of the “set” of values. Index 0 might be current pot values, 1 would be 1st stored value (so you would need a static value, buffer, or queue node feeding input for 1st value of nth-input node). If you have 3 POTs, you will need 3 nth-input or select nodes. If you can save 5 presets, you will need 3 x 5 constant/buffer/queue nodes for storing values.

If you want to be able to dynamically change any of your presets, then you need a way to select which preset to change (perhaps a rotary encoder, or two buttons to select +/-; and probably a display to show which preset is selected) and a button to save new values. Your value to select preset will then need to feed into gate nodes feeding your buffer nodes so that only the desired buffers get changed when you save. The alternative is to just push the current POT values onto a stack using queue nodes instead of buffers. Optionally, you could add a POP button to delete top preset from the stack.

nth input :thinking: another node that I did not register, I did not know what it meant, that’s why I made the dataselect

Hi the19thbear

Something like this?

bradzilla84/preset-select

Thanks Bradzilla. I#ll look into it