As the cam mechanism turns, the linear motion is repeated over and over ... sewing machines, or toys. This walking toy, for example, has cam mechanisms attached to the legs, that help it walk.
This custom linear Hall effect sensor is a perfect example ... There’s clearly a long way to go to tighten things up, but the basic mechanism looks like a clear win to us. Hats off to [Nixieguy ...