Blue Robotics Bar02 Pressure Sensor sample MS5837-02BA Pressure Sensor
Dependents: Bar02_MS5837-02BA OCE360_Project
Fork of MS5837 by
Diff: MS5837.h
- Revision:
- 1:ee71a13b8e68
- Parent:
- 0:0c2c06ab8e72
diff -r 0c2c06ab8e72 -r ee71a13b8e68 MS5837.h --- a/MS5837.h Mon Jul 25 00:19:52 2016 +0000 +++ b/MS5837.h Tue Jul 17 16:11:48 2018 +0000 @@ -32,6 +32,9 @@ #define ms5837_ADCread 0x00 // read ADC command #define ms5837_PROMread 0xA0 // read PROM command base address +//#define fluidDensity 1029 //kg/m^3 (seawater) +#define fluidDensity 997 // kg/m^3 (freshwater) + class MS5837{ private: int D1, D2, Temp, C[8]; @@ -55,6 +58,7 @@ float MS5837_Temperature (void); void Barometer_MS5837(void); float depth(void); + float altitude(void); private: I2C i2c;