A library for the HMC6343 compass