ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
DevHeads IoT Integration ServerDIIS
DevHeads IoT Integration Serverโ€ข2y agoโ€ข
3 replies
JeremyCook

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
file0.jpg
file1.jpg
GitHub
arduino-experiments/MIDI/1-inch-MIDI at main ยท JeremySCook/arduino-...
Experiments in Arduino C. Contribute to JeremySCook/arduino-experiments development by creating an account on GitHub.
DevHeads IoT Integration Server banner
DevHeads IoT Integration ServerJoin
The DevHeads IoT Integration Server accelerates technology engineering by helping pro devs learn, share and collaborate.
2,984Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Issues with measuring multiple switch inputs via single DAC in R-2R resistor configuration
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / ๐ŸŸฉ-pcb-and-analog
2y ago
Zero Ohms resistor on the Power Line
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / ๐ŸŸฉ-pcb-and-analog
3y ago
How to optimize PCB design for DRV8320 and STM32G431RBT6TR to minimize vias?
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / ๐ŸŸฉ-pcb-and-analog
2y ago
Why Does My ATTiny85 Analog Input Return a Constant Value After 24 Hours?
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / ๐ŸŸฉ-pcb-and-analog
2y ago