You’re a little light on details about your breakout board.
Back in 2018 I bought this 3-axis magnetometer from Pololu https://www.pololu.com/product/2127 It wasn’t exactly a great match with my phone’s compass, but it was fun to use. As I recall, I would never have been able to figured out how to use it without the Arduino library that they supplied. I’ve learned alot about using sensors and microcontrollers from their libraries. You might want to check them out.
Tom
To err is human.
To really foul up, use a computer.
That is all the details I have. I will check with Jaycar. Sometimes there is a techie there that may be able to help.
It is from Duinotech.
That kinda looks like Amazon's "https://www.amazon.ca/DKARDU-QMC5883L-Compass-Magnetometer-Electronic/dp/B09F3LHNB3"
In which case the Arduino library might be relevant ...
Anything seems possible when you don't know what you're talking about.
Wow @will, that’s pretty impressive sleuthing!
To err is human.
To really foul up, use a computer.
Thanks for the find Will.
https://github.com/mprograms/QMC5883LCompass/?tab=readme-ov-file
I wired it up to the Mega but all I get is zeros and a heading N.
The TX led on the Mega flashes away.
I triple checked the wiring 🙂
VCC O ---- O +5v
GND O ---- O GND
SCL O ---- O A5
SDA O ---- O A4
DRDY O ---- X NOT CONNECTED
When I clicked for,
Board Hookup Reference
QMC5883L hookup to Arduino Uno / Nano. For other boards see Arduino Wire Reference
I get an error.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>B77FRFMD5MHRYS1J</RequestId>
<HostId>2EvuuKessSVW8A6ZwP4jQPn0NZ8bT1QP9f+TJcs8ePp0uiyrLDHNpmTEb7s222LNcNiNUG7Ndl6btaAqcnaUEnVA4zeQwkNV</HostId>
</Error>
Which driver are you using for this? You might try the Arduino-HMC5883L driver. Apparently there is a difference between the QMC5883 driver and this HMC5883L driver. This one might work. (No guarantees!)
Regards,
The HMC5883L is very different in appearance.
I installed and included this driver as per code example.
OK, sorry. I was looking at reviews on Amazon.com for a Hiletgo QMC5883 board that looks similar to the one you showed, and they were talking about how the drivers were different. This library worked, where the QMC5883 driver didn’t.
Have a good day.