grove_barometer
Diff: grove_barometer.h
- Revision:
- 0:3d05d80776f9
diff -r 000000000000 -r 3d05d80776f9 grove_barometer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/grove_barometer.h Tue Jun 09 10:17:13 2015 +0000 @@ -0,0 +1,17 @@ + + + +#ifndef __GROVE_BAROMETER_H__ +#define __GROVE_BAROMETER_H__ + +#include "suli2.h" + +#define BMP085_ADDRESS (0x77<<1) + +void grove_barometer_init(I2C_T *i2c, int pinsda, int pinscl); +bool grove_barometer_write_setup(I2C_T *i2c); +bool grove_barometer_gettemperature(I2C_T *i2c, float *temperature); +bool grove_barometer_getpressure(I2C_T *i2c, long *pressure); +bool grove_barometer_calcaltitude(I2C_T *i2c, float *altitude); + +#endif