I2C driver for HMC5583L digital compass sensor
Diff: hmc5583l.h
- Revision:
- 0:91f08ac76444
- Child:
- 1:097089f0feb1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmc5583l.h Thu Dec 03 07:52:58 2015 +0000 @@ -0,0 +1,25 @@ + +#pragma once + +#include "mbed.h" + +struct coord{ + int x; + int y; + int z; +}; + +class HMC5583L{ + public: + HMC5583L(PinName sda, PinName scl, int address); + + coord getCompass(); + + protected: + int address; + I2C i2c; + + protected: + int regToInt(char msb, char lsb); + +}; \ No newline at end of file