#include #include #include volatile int8_t enc_delta=0; // -128 ... 127 int main( void ) { // rotary switch connection DDRE &= ~(_BV(PE3) | _BV(PE4)); // set to input PORTE |=(_BV(PE3) | _BV(PE4)); // enable pull up TCCR0 = 1<