Hi. I'm looking at a schematic for an r/c radio controller that has a bunch of switches going to inputs on an Atmega64. Each and every input goes like the attached image. I removed both discrete components (of course bridging the resistor) and the switch seems to work fine. I opened up a different radio and it too has a resistor inline and a cap on every switch.
What are they for?
My first thought was debouncing, but the same setup is used for a potentiometer too. Does that need to be debounced?
Or does it help with EMI?