How to optimize resistor values for reading multiple buttons on a single analog input?
Came up with some code for a project I'm working on that is able to read two buttons for each analog input (and tell if two have been pushed) based on this circuit. It works, but is not really optimized resistors-wise. I've yet to figure out a generalized expression for this type of parallel circuit (thinking one in which I could make it 3, 4, whatever resistors/buttons), which admittedly would be a matter of elegantly combining some algebraic equations.
Any thoughts?
Here's the rest of my code, FWIW https://github.com/JeremySCook/arduino-experiments/tree/main/MIDI/1-inch-MIDI
Any thoughts?
Here's the rest of my code, FWIW https://github.com/JeremySCook/arduino-experiments/tree/main/MIDI/1-inch-MIDI


GitHub
Experiments in Arduino C. Contribute to JeremySCook/arduino-experiments development by creating an account on GitHub.