This digital compass sensor performs 100 measures per seconds and returns a value between 0 and 359 degrees, representing the angle to the north. Two different modes are available on this sensor:
In lecture mode, the sensor returns a value each time a read command is sent by the Lego Mindstorms NXT Intelligent Brick
In calibration mode, the sensor can be configured to compensate for parasite magnetic field sources such as electric motors of the robot, batteries...
A relative or absolute lecture mode is available, making programs easier to achieve if one wants the robot to follow a particular direction