Go Down

Topic: hmc5883L 2nd and 3rd directions  (Read 67 times) previous topic - next topic

amyu98

(Sorry for poor english)
Hey,
Im using the hmc5883L Triple-axis Magnetometer , and Im sondering if there is by any chance, a way to get another info about its status except from the info i get about its borth-south status. 

When im doing this:
   float headingX = atan2(raw.XAxis, raw.YAxis);
I get the compass info, but i want the 3D Gyro info... can I get it?

 float headingX = atan2(raw.XAxis, raw.ZAxis);
or
 float headingX = atan2(raw.ZAxis, raw.YAxis);

just wont work.
thanks.

jremington

Quote
i want the 3D Gyro info... can I get it?
Not from a magnetometer.

blimpyway

Well, he should be able to read X Y Z values of the magnetic field vector.

amyu98, you should post your code, and what output do you get from it.
 If you need help, "just wont work" is useless information.

jremington

#3
Jul 04, 2016, 06:50 pm Last Edit: Jul 04, 2016, 06:50 pm by jremington
Guessing from the working example, to print all three raw magnetometer readings:
Code: [Select]
Serial.println(raw.XAxis);
Serial.println(raw.YAxis);
Serial.println(raw.ZAxis);

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy