minor i2c improvements; updated hmc5883 code