Mouse is the most important device for computers that we are using today.
The main goal of the mouse is to translate the motion of your hand into signals that the computer can understand.
How it works?
Inside the mouse there is a ball that touches the desktop and rolls when the mouse moves.
Also there are two rollers inside it that touches the ball.
One of the rollers is oriented to detect the motion in X direction and other one is oriented 90 degrees to the first roller so that it detects motion in Y direction.
When the ball rotates, one or both the rollers rotate.
The rollers are connected to a shaft.
The shaft spins a disk that has a hole in it.
When the roller rolls, the shaft rotates the disk.
On either side of the disk there is an infrared LED and an infrared sensor.
The hole in the disk breaks the beam of light passing between LED and sensor so that the sensor senses a pulse of light.
The rate of the pulsing is directly proportional to the speed of the mouse and the distance of its travel.
It also contains an on-board processor chip that reads the pulse from the infrared sensor and converts them to the binary form that the computer can understand.
The chip sends the binary data to the computer through the mouse's cord.
In this way all our movements reaches the computer through MOUSE.