


The holes in the disk break the beam of light coming from the LED so that the infrared sensor sees pulses of light.

When the ball rotates, one or both of these rollers rotate as well. One of the rollers is oriented so that it detects motion in the X direction, and the other is oriented 90 degrees to the first roller so it detects motion in the Y direction.
