Can''t even remember when I wrote anything more complex than three lines of bash for the last time, so I didn't expect to get my little project, a simple MIDI-preset switch for my guitar FX-rack to really work out. Specifically not the breadboard prototype, because they never work for me..
Simple need, simple solution: a ROLAND FS-6 double footswitch on the input side, daisy-chained MIDI effects on the output. Left FS sends PROGRAM_CHANGE -1, right PROGRAM_CHANGE +1. Presets are identically numbered on all devices and either in the order of a playlist or just standard presets, grouped and varied a couple of times. Like 1: plate reverb, 2: clean, 3: flanger,, 4: clean, 5: plate reverb + flanger, 6: clean...
Works as intended, 'material costs -footswitch aside- none. Had a Nano clone, a couple of resistors and switches at hand, will use the case from an obsolete euro-rack EQ for the final build, because it already has power switch, LED and TRS connector in place.
Actually belonged to a Raspi - I found it while looking for pulldown resistors and tried if it would still stick. Seems it did and I completely forgot it was there.
Little update: Got it soldered on rasterboard and integrated into my rack, powered by my pedalboard's isolated ten line-PSU (thanks to individually settable voltages) and running as intended. Just to realize that I'll need an option to send CC#28 (bypass on/off). I've implemented it as "both switches on" (I just had to rewrite the better part of the input routine for it - 2 bits representing D2 and D3 instead of clumsy if-then-
else clauses) and am just about to take the whole thing apart to connect the SPI programmer. Might just drill another hole or better extend the ISP header to the outside for easier firmware upgrades- I am afraid that "simple two afternoons job" is about to become one of these projects unless I'll stand strong against the persuasions of feature creep. If anyone is interested I can upload wiring diagram and code as soon as the last change is tested and working.