rotary encoder is PD1 and PD3