I am testing input on the Arduino via this kind of buttons:http://www.robot-italy.com/it/pulsanti-quadrati-colorati-assortimento-15pz.html
Unfortunately, the input seems to be unreliable. I've linked the button to a "volatile" counter in my sketch, and I increment the counter each time the button is pressed. Unexpectedly, sometimes the counter is incremented more than one time for each press (say, it steps from 3 to 7 instead of 4).
This is the code I'm using to the bare minimum. I attach also an image of the circuit (but it's very simple).
#define INPUTPIN 3
volatile int counter=0;
Thanks in advance for your help.