
Jaychadw
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.
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.
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)
Code:
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.
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.
Still can't figure out how to get this working *confused* its driving me nuts
Other than that, what can't you do?
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.
I2C Address for read is 0x3D so,
Code:
should store the sensor values in the variable $raw.
Where did you get it? I can always get one and have a play too, £3 isn't going to break the bank.
any way heres the direct link to where I got it. Takes a couple of weeks to get here http://rover.ebay.com/rover/0/e11400.m1842.l3160/7?euid=b57bc911f9174b9d8179d4d5dd710e95&loc=http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem%26item%3D171028749692%26ssPageName%3DADME:L:OC:GB:3160
Old discussion but apparently no solution has been found. I'm also Struggling trying to use HMC5883L chip which crashes my EZB everytime I try to initialize it, using the EZB tutorial's script.
I get that I have to write something, using the datasheet but I can't figure what I'm suppose to send to this i2C device... what hex data am I suppose to write?
Well, I'm totally lost. I'd love my robots to know which direction they're heading though.
Rich? Any help? TheTechguru? Someone?