HiTechnic compass

This sensor is a digital magnetic compass that measures the Earth's magnetic field to find the position of the Earth's magnetic poles. This sensor outputs a value from 0 to 359 degrees, which indicates the sensor's current absolute heading (the angle that the sensor faces) based off of magnetic north. A heading value of 0 degrees means that the sensor is facing due north; 90 degrees indicates that the sensor is facing east, 180 degrees is south, and 270 degrees is west:

The sensor also has a relative heading feature, which allows the user to set a target heading. The target heading becomes the new zero position. Relative ...

Get Building Smart LEGO MINDSTORMS EV3 Robots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.