HMC5883L has anyone ever got it working?

I have tried every lib i could find and nothing seems to work, wasted hours on this.
Has anyone got a script and diagram used to get this working?

Have you seen my reply here?

Have you tried the I2C scanner (suggested in that thread)?

I seen it but it just ads more confusion.

I tried the I2C scanner, but how does that help, what do i do with the info?..

If you got the info, it tells you that the wiring is probably good.
If you don’t, it’s probably not.
And as side effect you also then know the actual I2C address of the device.

Yeah i got the address but there is no setting in the script for an address…

What script?

BTW, these are no scripts but source files for an application which will be compiled. Scripts are interpreted.
The I2C address is used inside the HMC5883L library.
You need to check whether it’s the one you got reported by the scanner or not.

found at address 0x0D

How do we include that in the main “script” or whatever the definition is of the .ino file…
You don’t seem to be able to edit the lib imports from the web IDE…

Nope, contributed libraries can’t be edited.
If you had to - for whatever reason - you’d need to add some extra file tabs and copy/paste the library code there
https://docs.particle.io/guide/getting-started/build/photon/#adding-files-to-your-app

The library uses 0x3C >> 1 which evaluates to 0x1E which does not fit your 0x0D.

Which comes back to the whole point of this topic…
Has anyone got it working…

Hmm… that’s odd, since, as far as I can tell from the data sheet, this device has a fixed I2C address of 0x1E. What actual device (or breakout board) are you using?

Using this : https://www.amazon.co.uk/gp/product/B00GKEKGH2/ref=oh_aui_detailpage_o05_s00?ie=UTF8&psc=1
Apparently the company was sold and all the new chips have this new I2C address, i have chips from 4 different suppliers all with the same address.

There is a customer review that also comlained about this issue

Have you tried the suggestion

This way you can adjust the I2C address.