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 passport to a world of endless possibilities in robot programming, waiting for you to explore.

United Kingdom
#9  

That'll do, I think... I only had a quick look as I really should be doing some work but when I get chance I'll have another look if you need it.

Look at page 11 and the last few pages, they should help you. From a very quick look it looks like it's a good datasheet which is half the battle.

United Kingdom
#10  

excellent thank you. knowing its a good start is a great help. I'll leave this thread unresolved for a bit incase anyone can advise a bit more if I get stuck

United Kingdom
#11  

Hi guys

Still can't figure out how to get this working confused its driving me nuts

United Kingdom
#12  

Have you tried with the latest ARC update, I briefly read the notes and noticed something about I2C Read being fixed... that may be something.

Other than that, what can't you do?

United Kingdom
#13  

No I haven't let it update yet actually. I do remember talking with DJ about some usefull things we could do with when it came to i2c and he mentioned there was some changes coming. I'll check it out now.

If it don't work with it it only cost my £3 including postage. No real loss. It works with other controllers like arduino but they have a dedicated library.

United Kingdom
#14  

All the commands are in the datasheet you linked to.

I2C Address for read is 0x3D so,

$raw = I2CRead(0, auto, 0x3D, 8)

should store the sensor values in the variable $raw.

United Kingdom
#15  

Ah right, thought you had to send request commands to it and such

United Kingdom
#16  

You may need to do some I2CWrites to initialise it and get it in the correct mode, the details are in the datasheet.

Where did you get it? I can always get one and have a play too, £3 isn't going to break the bank.