An encoder is a sensor of mechanical motion that generates digital signals in response to motion. ... There are two different types of encoders: linear and rotary. A linear encoder responds to motion along a path, while a rotary encoder responds to rotational motion.