modified version of MAG3110, include getX();getY();and getZ()
Fork of MAG3110 by
Diff: MAG3110.h
- Revision:
- 6:8f4028440d15
- Parent:
- 4:cf40601402b7
diff -r 888035fbef65 -r 8f4028440d15 MAG3110.h --- a/MAG3110.h Fri Feb 07 00:33:01 2014 +0000 +++ b/MAG3110.h Thu Feb 13 01:58:54 2014 +0000 @@ -111,7 +111,7 @@ * @param regAddr The address to read * @return Value from 2 consecutive registers */ - int readVal(char regAddr); + float readVal(char regAddr); /** * Calculate the heading * @return heading in degrees @@ -123,7 +123,7 @@ * @param yVal Pointer to Y value * @param zVal Pointer to Z value */ - void getValues(int *xVal, int *yVal, int *zVal); + void getValues(float *xVal, float *yVal, float *zVal); /** * Set the calibration parameters if required. * @param minX Minimum value for X range @@ -132,6 +132,9 @@ * @param maxY maximum value for Y range */ void setCalibration(int minX, int maxX, int minY, int maxY); + float getX(); + float getY(); + float getZ(); private: I2C _i2c;