Built from datasheet for 9-DOF sensor stick from SparkFun.
Dependents: 9Dof_unit_testing sparkfun6dof Seeed_Grove_Digital_Compass_Example CompassTest ... more
Diff: HMC5883L.cpp
- Revision:
- 4:bc4e1201e092
- Parent:
- 3:14d274e0f9de
--- a/HMC5883L.cpp Tue Nov 06 17:25:45 2012 +0000 +++ b/HMC5883L.cpp Tue Nov 06 17:35:51 2012 +0000 @@ -131,7 +131,7 @@ double HMC5883L::getHeadingXY() { - int raw_data[3]; + int16_t raw_data[3]; getXYZ(raw_data); double heading = atan2(static_cast<double>(raw_data[1]), static_cast<double>(raw_data[0])); // heading = arctan(Y/X)