HMC5883L Digital Compass Library
Fork of HMC5883L by
Diff: HMC5883L.h
- Revision:
- 3:65db23abde25
- Parent:
- 1:4c295f793d46
diff -r bbc9ad18fd3e -r 65db23abde25 HMC5883L.h --- a/HMC5883L.h Wed Aug 05 13:16:12 2015 +0000 +++ b/HMC5883L.h Fri Apr 14 23:34:27 2017 +0000 @@ -28,7 +28,6 @@ #include "mbed.h" #include "math.h" -#include "ledControl.h" #define PI 3.14159265359 #define GAUSS_TO_MICROTESLA 100 @@ -65,9 +64,11 @@ class HMC5883L { public: + HMC5883L(PinName sda, PinName scl); void init(); double getHeading(); - void readMagData(float* dest); + void readMagData(float* dest); + I2C i2c; private: void setMagGain(MagGain gain); void writeByte(uint8_t address, uint8_t regAddress, uint8_t data);