MAG3110 Virgo robot adaptation
Fork of MAG3110 by
Diff: MAG3110.cpp
- Revision:
- 5:9644c7d596a1
- Parent:
- 1:5a0e7a58d980
- Child:
- 6:b2bb387caf3f
--- a/MAG3110.cpp Fri May 24 20:16:24 2013 +0000 +++ b/MAG3110.cpp Thu Oct 10 02:22:13 2013 +0000 @@ -5,14 +5,14 @@ /****************************************************************************** * Constructors ******************************************************************************/ -MAG3110::MAG3110(PinName sda, PinName scl): _i2c(sda, scl), - _i2c_address(0x1D), _pc(NULL), _debug(false) +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, Serial *pc): _i2c(sda, scl), - _i2c_address(0x1D), _pc(pc), _debug(true) +MAG3110::MAG3110(PinName sda, PinName scl, int addr, Serial *pc): _i2c(sda, scl), + _i2c_address(addr), _pc(pc), _debug(true) { begin(); }