Adding the roling average filter for the encoder read