implementing compass and i2c