MAG3110 is interesting little device, it’s preciese 3 axis magnetometer which measure the magnetic field in range +- 1000 uT and have sensitivity of 0.1 uT.
MAG3110 is manufactured by Freescale and you can find the datasheets here.
Magnetometers are widely used by treasure hunters to scan geo magnetic field and make maps. Why? because metals in earth change the earths magnetic field and scanning the magnetic field you can see what is under the surface.
Typical magnetometer maps is like this you can see different magnetic levels colored in different colors.
MOD-MAG.c demo code is available on GitHub .
Before you use it make sure your board is with hardware I2C enabled as I explained in my previous post: http://olimex.wordpress.com/2012/09/25/imx233-olinuxino-i2c-tutorial-using-wii-nunchuk/
Once you download it you can compile and make executable:
$ cc MOD-MAG.c -o mod-mag
$ chmod +x mod-mag
then when you execute it you will see MAG3110 registers:
MOD-MAG DEMO PROGRAM
these 9 registers actually contain X,Y,Z values x2 bytes per axe
by approaching magnet to MOD-MAG you can see how these values are changing, now all you have to do is to scan some surface and find a good way to visualize the captured info