I'm pretty new to Arduino and coding bar some HTML and CSS in the past. I have an idea which I would like to implement with an Arduino but I'm a bit lost as to where to start learning
I want to build a programmable switcher for my guitar pedals using relays to select the pedal's loops. I'm fine with the relays but what I need to learn is how to program the Arduino to remember which collection of loops to activate with each preset switch.
I intend to have four loops that I can select and would like to use four switches. Each switch would be a preset, and when in programming mode would correspond to a loop to select, so for example if I wanted to set preset 1 to include loops 2 and 3 I would hold down switch 1 for a few seconds to start the programming mode, then tap switches 2 and 3 to select loops 2 and 3 for the preset, and then hold down switch 1 again for a few seconds to exit programming mode. After that when I select switch 1 the preset would active loops 2 and 3, and if I selected another preset it would replace the previous one.
It is a simple premise but I am unsure of how to approach it. I'm looking forward to getting my teeth into the project and I was hoping that someone would give me some hints about the best way to start, or which Arduino functions would be the best to start experimenting with.
So are there as many loops as there are presets? You need to write code that recognizes "press" and "hold" for pedals. Maybe a display with a menu will be more convenient (well I don't play guitar) to select and edit what each pedal will play? I am thinking say 3 preset pedals and 4 loops. You use up down to highlight a preset and use 4 buttons to toggle on or off each loop.
I guess you need to do some practice before going for the big project. A good starting point is to look at how to detect a button push and then debunce it. After that you can learn how to detect button hold. Then you can develop your project logic with buttons and LEDs to represent the loops. Then connect your arduino to devices that can play loops.
Yes sorry I maybe should have thought about giving a better example
Thank you for the idea of just using LEDs for the moment, I will build a test project like this first so once I have learnt and perfected the code I can then apply it to the final build using the hardware required.
So now I will have four momentary switches, 4 red LEDs and 4 green LEDs, the green represent what will be relays in my final design.
The four red LEDs will represent which preset is being used and the green LEDs will show on or off depending on how they are programmed for each preset.
In preset mode pressing a switch will bring up it's preset and in programming mode the switch chooses whether the green LED will be on or off for the preset being programmed.
I'll start playing around with the button code. I'm guessing that I'll need to use the EEPROM too, to store the presets in programming mode and to recall them from in preset mode.
Is that correct or am I missing something, or anything else?