With 10 or 20 keys, how do you handle the event of more than one key being pressed at the same time?
With 10 or 20 keys, how do you handle the event of more than one key being pressed at the same time?
By clever selection of ADC resistors.
This had been solved long time ago, and not by me![]()
Recent posts got me thinking. Are you designing something with a bunch of buttons, each with a specific functionality? Or are you trying to do something more akin to a key pad? If you're using a standard key pad there are set-ups using resistors to create a narrow voltage range with the press of any individual key. That only requires one analog input to read any key press.
https://aws1.discourse-cdn.com/ardui...2_542x500.jpeg
12 buttons is ok with 8 bit adc . with 16 the last row gets down to 2 or 3 counts separation , a bit close for comfort in my view
Warning I'm not a teacher
At current stage, I'm looking for more efficient and small code
for ADC key handling.
Doesn't post#2 with the use of Select Case do what you want with the least code/var usage?
Ioannis
No it does not.
It does not do "do not repeat action until user releases and pushes key again"
Bookmarks