Sampling camera and Hall encoder in interrupt