Makes sense, thanks! So EEPROM storage for the array it is.
I made some more progress lately. I now have 2 potentiometers hooked up, to simulate the LEVEL and DRIVE POTs in the effects pedal, and two LEDs to stand-in for the DigiPots, which haven't arrived yet (due in on Monday). I also removed the preset selection POT and button and replaced both with a rotary encoder with integrated button.
The functionality works by using the two POTs to change the values, then rotate the rotary encoder to select a preset number from 0 -99, and do a long press on the encoder's button. That saves both POT values to the preset # in two arrays (one for each POT).
For recalling presets, you rotate the rotary encoder to a preset # and short press the encoder button.
After recalling, if you move one of the knobs, the value changes of just that one POT, but not the other. I did this thinking through the use case, where I'm playing guitar, and I recalled a preset ... but maybe the drive is just a bit too much, or the level needs to come up a bit. I can adjust just one knob, then re-save the preset without having to redial in the other knob.
I'm building a small breakout box which has the rotary encoder, and will also house a 2 digit, 7-segment display for displaying the preset # being selected by the rotary encoder. The breakout box will connect to the pedal through some kind of interconnect ... maybe a CAT6e cable? not sure yet.
I'm hoping I can use the USB port on the Nano for the midi input, so the pedal will be able to function even without the breakout box attached. It will certainly work normally, by manually turning the knobs, but I'd like it to be able to do MIDI recall even without the breakout box connected. Still need to research that piece.
Here is what the proto looks like today. The micro button on the left is just for debugging. It dumps the array values on the screen through Serial.print ().
Here is the current version of my diagram. Of course, the LEDs are standing in for the Digi-POTS, and I haven't drawn the display or the MIDI interface in yet either. Like stated above though, I'm hoping I can use a USB to MIDI cable direct into the USB port on the Nano. The segment displays will hopefully arrive next week.
And the code is attached, if anyone is interested.
POT_n_LED_Test.ino (13.5 KB)