HMC5883L's that won't play nice

This may be an old topic but I just got some of the HMC5883L’s to add to my remote weather station. I can’t, for the life of me, get theses little rascals to work. I have downloaded MANY …ino files in an attempt to get readings. No joy. Arduinos, Chinese arduinos, Mega2560s.
What am i missing. My friend, Mike, is a code-master supreme and we just can’t get the HMC5883L to work. WAZZUP???

Are you using a Particle device? It’s hard to tell “WAZZUP” without knowing how you wired your device, what library you’re using with it, and what code you’ve tried.


Tnx for reply. Where to begin? Ordered 5pcs of HMC5883L from eBay. Connected as per drawings. Downloaded sketches from everywhere. i2C_Scanner reported address of 0x0D. No joy. Tried 0x1E. Nope. 0x2F. Same. Saw an eBay listing offering a chip with a P/N of “L883”. GOt the same 5883 chip instead.
Any sketch from any source will compile and download. Yet, none will display good data. Followed Youtube instructions to the letter. Nope. Tried 4700 pull-ups. Nope 2200? Same
5.0 vdc/3.3 vdc. No joy.
Short of pressing “enter” with a BFH, nothing will get these to work. And, yes, the headers are magnetic. (One website said that this was the problem). So, I repeat – "WAZZUP?"
A good friend, a code smith since the 70’s and a REAL whiz, has been racking his brain over this with me as well. We need help.
Dave Ikonen

Hi @ikonen

I see these on eBay and many say they are not code compatible with the original part. Maybe that could be part of the problem?

On the datasheet, the part is 2.5V on the analog power and 1.8V on the digital I/Os so it would seem to require level translators for any Particle device. That would be another thing to double check, particularly if you have a scope or similar to check the signaling.

There are some people on this forum who are really good at spotting problems but they can only do that if you post something for them to look at.

Post your code, a photo of how it’s wired up and the output.