Rotary encoder code.

The cheap rotary encoders are pretty noisy, so they aren't particularly reliable for exact clicks back and forth. But, they are decent enough for menu selection.

A1 = GPIO_PIN16; A2 = GPIO_PIN19; SW = GPIO_PIN26;