I2C driver for HMC5583L digital compass sensor
hmc5583l.h
- Committer:
- sillevl
- Date:
- 2015-12-03
- Revision:
- 0:91f08ac76444
- Child:
- 1:097089f0feb1
File content as of revision 0:91f08ac76444:
#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); };