Simple library for MAG3110 magenetometer as built into Avnet Wi-Go module
Dependents: Wi-Go-MagnetometerTest EE202A_HW1_MH serialtoxively mbed_nanosec_timer ... more
Diff: MAG3110.h
- Revision:
- 5:f3abe901c33a
- Parent:
- 4:cf40601402b7
- Child:
- 7:0f45239e157a
- Child:
- 9: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