Another thing that the sort and average routine in post #11 does is to perform the routine twice and compare the two resulting averages before declaring "I see a valid key" (if adca=adcb then gosub efectuez).

That could be adapted to fit into the "check_sw" portion of your code by changing some of the post#11 averaging variables around and only
changing the "result" DataW on a match...
Code:
if adca=adcb then
  DataW = adca
endif
return
How well all that works depends on the noise, how many switches (and how far apart the values are), etc, but I could see where it'd be better than just using a single adc value for sure.


if anyone is interested I do have a multiple button version that is complete and works
Sure. Love to see it.