Originally Posted by miceblue
The Arduino code doesn't look terribly complex, but it will be interesting to see to see what people do with it.
There looks to be some code to prevent accidental gain pressing, setting a delay for the push (push volume lever, code detects if it's pressed, pauses code for a brief fraction of a second [can be adjusted], code detects if it's still pressed, runs the code to change the gain state). If the volume lever is constantly jostled or accidentally pressed, changing the delay to a higher value might be useful in that case (forcing the user to hold-down the volume lever for a longer period of time before the gain toggle code activates).
I like the idea of running the amp in a dark mode. You could leave the blinking led for low battery, and have the led flash when changing volume, or flash a message in morse code when it starts up.
You could make things more complex by adding logic for different modes of operation. I could see this as useful for an IEM mode and "can" mode. (its a joke, i2c vs. can bus... :) )
possibly double clicking the "gain" button (press in on the volume control) you could change modes, then the volume increase would be more sensitive in the low volume range vs faster stepping for the larger headphones. You could also change the max volume say in the IEM mode, should you hit volume up in your pocket, it wont make your ears bleed. Safety first. :)
Alternatively, you can add a watch timer, so say, if the downtemp is held down for more than 1 second, the amount the volume is stepped is doubled. You could even change it more after two seconds, etc.
perhaps rather than a mode change, you could incorporate a mute functionality depending on your needs.
Lots of options here, its awesome John has given us so many options!