This tutorial shows how to explore an inexpensive HMC5883 3 axis magnetometer module with Arduino.
The magnetometer module can be purchased on eBay at very low cost (<$3), and is an ideal educational project for the budding Arduino practitioner.
It is an ideal low cost project for a first exploration of explore I2C, and the basis for a digital compass. This particular module breaks out DRDY which is useful for interrupt driven applications.

Fig 1 shows the test setup:
- at the top is a Arduino Pro 328 with Opti bootloader and FTDI adapter for programming;
- middle is the HMC5883L module; and
- bottom is a Logic Shrimp for logic tracing.