It has a built-in Hall-Effect sensor that can detect changes in the direction of magnetic field. So, we just have to attach a magnet to the output shaft of the motor and position it close the microchip at a distance from 0.5 to 3mm. Now as the motor shaft and the magnet will rotate...