HMC5883L compass is a digital sensor that can be used on robot navigation.
This sensor module can be interfaced to the MCU controller through the UART interface. It can output the digital number from 0 to 360 to represent the degree.
The LED will turn on to show the angle between the sensor and the earth magnetic field.