I have a very basic question here regarding the INPUT function. I am playing with a PIC Microcontroler and trying to make it respond to buttons. In the process I learned that I need to have a debouncer for the buttons, since the pressing of a button is registered more than once on a single push.
Since I have multiple buttons, I would like to write a simple little function that will take as input the button pushed and debounce it.
Following is the code I am currently using:
void debounce(int bt)
The message I get is:
Expression must evaluate to a constant.
Every example I saw sofar is not telling me how to pass a variable to a function like INPUT. They usually pass #DEFINEs
Is it possible to pass a variable to input?