Added function to retrieve raw data from sensor
Dependents: KL46_eCompass Multi-Sensor Freescale_Multi-Sensor_Shield Freescale_Multi-Sensor_Quadcopter ... more
Fork of MAG3110 by
Diff: MAG3110.h
- Revision:
- 5:f3abe901c33a
- Parent:
- 4:cf40601402b7
- Child:
- 6:1da3fe7b3510
--- a/MAG3110.h Fri May 24 20:16:24 2013 +0000 +++ b/MAG3110.h Mon Apr 07 21:02:57 2014 +0000 @@ -117,6 +117,19 @@ * @return heading in degrees */ float getHeading(); + + /** + * Perform a read on the X, Y and Z values, converted to microteslas. + * @paran mag Pointer to the 3 element array whare the results will be placed + */ + void ReadXYZ(float * mag); + + /** + * Perform a read on the raw X, Y and Z values. + * @paran mag Pointer to the 3 element array whare the results will be placed + */ + void ReadXYZraw(int16_t * mag_raw); + /** * Perform a read on the X, Y and Z values. * @param xVal Pointer to X value @@ -139,6 +152,7 @@ Serial *_pc; bool _debug; int _avgX, _avgY; + int x, y, z; }; #endif