Introduction - If you have any usage issues, please Google them yourself
Code snippet for using a quadrature encoder button with an AVR microcontroller. Code is interrupt driven. A low pass filter (100nF, 3k3) is assumed between microcontroller and quadrature encoder button