Simple library for MAG3110 magenetometer as built into Avnet Wi-Go module

Dependencies:   MotionSensor

Dependents:   Wi-Go-MagnetometerTest EE202A_HW1_MH serialtoxively mbed_nanosec_timer ... more

Revision:
7:0f45239e157a
Parent:
6:f510561f6107
Parent:
5:f3abe901c33a
--- a/MAG3110.h	Tue Dec 31 17:16:37 2013 +0000
+++ b/MAG3110.h	Fri May 09 18:01:36 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
@@ -145,6 +158,7 @@
     Serial *_pc;
     bool _debug;
     int _avgX, _avgY;
+    int x, y, z;
 
 };
 #endif