I'm using a LCD4 cape to display a triangle which will keep pointing to north.
The magnetometer I'm using is HMC5843. It's an I2C device. It's part of the GY-80 module. You can easily get access to documents about GY-80 on the Internet.
Fortunately, Beaglebone Black already has its driver pre-built in. So I don't need to mess with drivers or device trees, which made things even easier.
I'm using Qt4 for graphic programming. I'm new to Qt.
USAGE
wire up the module and run:
./imu-setup.sh
./newtest -qws