Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: 1 [2]   Go Down
Author Topic: HMC5883L compass huge error [SOLVED]  (Read 16185 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I understand.  But when you tilt it a little from level the X mag value does not change, of course.
When you first tilt it 15 deg towards N, then back and forth another 15, the Y,Z do not change.
Only the orientation values change in this case.
Will see if your code handles this.
Reading the source looks great!
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While on the topic of this magnetometer, I have a Processing sketch that plots the x/y/z/heading and Bt.  I'm using scaled values to determin my heading and getting pretty good results.

My problem is that I'm using Serial.write() to send the signed integers to Processing.  Since each axis has two registers, and sends 2 bytes, I'm getting mixed values on the Processing end. 
How do I go about sending each axis MSB and LSB,  and then join the two once they are read in Processing?  I have searched forums and reference pages for days, and have not made
any progress.  I am storing the incoming bytes into an array in processing.  Any help would be appreciated.

Also, the good results I am getting are via the HMC5883L library instead of calling addresses on the I2C directly.  I'm allowing the library to do the heavy lifting.  Thanks in advance for
any assistance
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 318
Posts: 26927
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://arduino.cc/forum/index.php/topic,146299.0.html
Please don't cross-post.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: 1 [2]   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: