debounce problem

dhenry:

Use software debounce.

I have found the old fashioned r/c debouncer to be quite effective and reliable.

Yes, I'm sure it is; the atmega mcus have input hysteresis, so they can cope with the slowly-varying signal that this provides. But I prefer writing code to soldering components. [Actually, I don't even have to write any code, because I re-use the PushButton class that I developed a while ago.]