Skip to content

Strategy with many buttons #11

Answered by rlogiacco
rlogiacco asked this question in Q&A
Discussion options

You must be logged in to vote

The library is very well capable of handling 24 buttons on a single analog pin but, as you correctly stated, the voltage differences are going to be very small and that will be the tricky part. Memory consumption is not going to increase much, I went for a max 8 buttons default value for good measure (24 buttons, you must admit, is not the most common case): just add #define ANALOGBUTTONS_MAX_SIZE 24 before including the library.

You might want to test something like the circuit simulated at this link which, using a network of stock resistors, will provide more than 50mV difference between each button: that's around 10 points on the 12bits 1024 scale of ADC provided by AVR microchips. In …

Replies: 1 comment

Comment options

rlogiacco
Nov 16, 2018
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by rlogiacco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #11 on December 17, 2020 12:59.