Hi,
The examples from Arduino_HMC5883L_MASTER used : HMC5883L compass; and compass.begin();
and the: Adafruit_HMC5886L_Unified’s magsensor used: Adafruit_HMC5883_Unified mag = Adafruit_HMC5883_Unified(12345); and mag.getSensor(&sensor);
The names mag and compass are just names that identify an instance of the library's object. You could write Adafruit_HMC5883_Unified compass = Adafruit_HMC5883_Unified(12345); and compass.getSensor(&sensor); (change all references to mag to compass).
or Adafruit_HMC5883_Unified fred = Adafruit_HMC5883_Unified(12345); and fred.getSensor(&sensor); (change all references to compass to fred).
from a : Adafruit_HMC5883_Unified mag = Adafruit_HMC5883_Unified(12345); setting.
Do I have to use the method above or can I get the : desired_heading = xxxxxxx.x; just under the compass setting? actually how to get the x axis reading.
Best.