Caution, if you are buying a HMC5883L module, there are some fake modules about on eBay that claim they are HMC5883L devices but are in fact a QMC5883, which while they are indeed magnetic sensors, have a very different internal structure, different capabilities, and will not work with the software here. The way to tell a real HMC5883L is that the chip is marked L883 where as the "fake" chip is marked DA5883.