Simple library for MAG3110 magenetometer as built into Avnet Wi-Go module
Dependents: XtrinsicSensorEVK KL46Z KL46Z_CS213A_HW1 KL46Z_NokiaLCD ... more
Fork of MAG3110 by
Diff: MAG3110.h
- Revision:
- 5:9644c7d596a1
- Parent:
- 4:cf40601402b7
--- a/MAG3110.h Fri May 24 20:16:24 2013 +0000 +++ b/MAG3110.h Thu Oct 10 02:22:13 2013 +0000 @@ -10,7 +10,7 @@ #define PI 3.14159265359 -#define MAG_ADDR 0x1D +//#define MAG_ADDR 0x0E // define registers #define MAG_DR_STATUS 0x00 @@ -86,7 +86,7 @@ * @param sdl SCL pin * @param addr addr of the I2C peripheral */ - MAG3110(PinName sda, PinName scl); + MAG3110(PinName sda, PinName scl, int addr); /** * Debug version of constructor * @param sda SDA pin @@ -94,7 +94,7 @@ * @param addr Address of the I2C peripheral * @param pc Serial object to output debug messages */ - MAG3110(PinName sda, PinName scl, Serial *pc); //pass serial for debug + MAG3110(PinName sda, PinName scl, int addr, Serial *pc); //pass serial for debug /** * Setup the Magnetometer *