Simple library for MAG3110 magenetometer as built into Avnet Wi-Go module
Fork of MAG3110 by
Diff: MAG3110.cpp
- Revision:
- 5:5cb0370099ca
- Parent:
- 1:5a0e7a58d980
--- a/MAG3110.cpp Fri May 24 20:16:24 2013 +0000 +++ b/MAG3110.cpp Sat Feb 15 01:05:24 2014 +0000 @@ -5,6 +5,11 @@ /****************************************************************************** * Constructors ******************************************************************************/ +MAG3110::MAG3110(PinName sda, PinName scl, int addr): _i2c(sda, scl), + _i2c_address(addr), _pc(NULL), _debug(false) +{ + begin(); +} MAG3110::MAG3110(PinName sda, PinName scl): _i2c(sda, scl), _i2c_address(0x1D), _pc(NULL), _debug(false) {