United Kingdom
Asked — Edited

Hmc5883l Triple Axis Magnetometer Help

Hi

So finally I got may HMC5883L Triple Axis Magnetometer through. But I can't seem to get it working and there doesn't seem to be any reference to it only a dual axis one.

All connections were obvious so I know they are right. It's connected to the 3.3v not 5v.

I can't say much more than that.

I tried using the dual axis options but it only returns a heading of 44 all the rest of the values return -1.

I'd prefer to be using c# scripting if this helps at all.


ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

United Kingdom
#1  

The datasheet should tell you how to use it. Do you have the datasheet?

United Kingdom
#2  

er..... no I don't. Got it off ebay. ill do a quick search now confused

United Kingdom
#3  

The number one rule, always make sure you can get a datasheet:) I learnt that the hard way too.

If it's a breakout board you may need the schematic from the company who made the board too if connections, voltages etc. aren't clear.

United Kingdom
#4  

connections and stuff are all marked ok gnd,vcc,scl,sda etc just don't get how to read it

United Kingdom
#5  

Find the datasheet first, on it it should (however it's not guaranteed) tell you what you need to do to get the data from the sensor.

You use the i2cread command (I believe it is currently not working like it should though so be aware of that possible bug in 2013.07.10) to store the data i.e. (this isn't the actual code, I don't have the datasheet to check)

$raw = I2CRead(0, auto, 0x4a, 3)

Have a read of the script help in ARC for the i2c read command, hopefully it'll make sense to you.

I can't help with c# though, I don't know it well enough yet although I suspect it'll be similar.

United Kingdom
#6  

Will do. been waiting ages for this its gonna work whether it wants to or not

Canada
#7  

When you find the Datasheet go ahead and post the link here. That way we can all take a look at what is going on, and give you some guidance :)