This project uses SmartEverything Development Board’s on-board iNEMO 9-axis intertial module to make a digital compass. by 4D Makers @ hackster.io:
The Digital Compass project uses the SmartEverything Development Board’s on-board iNEMO 9-axis inertial module specifically the 3D Magnetometer. The magnetometer module is sampled for the x and y axis readings and then computed its compass headings.
The project is partnered with the gen4-uLCD-24DT to graphically display a rotating compass, and accurately represent the compass heading.
Digital Compass – [Link]