“The concept here is that multiple sets of buttons can be read by a separate analog inputs and can work either in tandem or stand alone. I do not want to use the memory to store values in an array, so I want to use code to determine the button value instead of a commonly used array look up table. For this reason I use a callback function to return the button based on the analog value. A callback is also used when a valid button is pressed. This allows the code to put into a library and only the base mechanism used.”