Hi,
I got two libraries for HMC5883L A & B. A used compass.begin() and with functions such as: compass.setOffset(0, 0); to set compass calibration offset.
B used compass.initialize(); , with function such as: compass.getHeading(&mx, &my, &mz);.
How to use B with the function of compass.setOffset(0, 0);
OR use A with the function of : compass.getHeading(&mx, &my, &mz);.
I'd tendency to use B. Do I have to edit the library like to copy class from A to B?
Thanks
Adam
links to those two libraries? There are multiple libraries available. It is usually best to stick to just one. They should both have the same basic functionality.
I would go with your version A library. Library B uses the I2Cdev.h library for i2c transmission rather than the standard Wire library. I am not a fan.
I'm sure either will work so just pick one and use it.