Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ms5611 by
ms5611 Class Reference
Create ms5611 controller class. More...
#include <ms5611.h>
Public Member Functions | |
ms5611 (PinName sda, PinName scl) | |
Create a MS5611 object using the specified I2C object
| |
ms5611 (PinName sda, PinName scl, CSBpolarity CSBpin) | |
Create a MS5611 object using the specified I2C object
| |
void | cmd_reset () |
Initialize the MS5611 and set up the coefficients First - reset the MS5611 Second - load coefficient values from the MS5611 PROM Third - calculate coefficient checksum This routine only needs to be run once at boot up. | |
double | calcTemp () |
Calculate and return compensated temperature Returns double temperature in degC. | |
double | calcPressure () |
Calculate and return compensated barometric pressure Returns double pressure in millibars. | |
double | getPressure () |
Return compensated barometric pressure Returns double pressure in millibars DOES NOT RE-CALCULATE FIRST!!! Saves time if you calcTemp(); first. | |
float | getAltitude () |
Calculate and returns altitude in feet Returns float altitude in feet. | |
float | getAltitudeFT (float sea_pressure) |
get altitude from known sea level barometer, @ no pre-pressure calculation | |
float | getSeaLevelBaroFT (float known_alt) |
Calculate and returns sea level baro Returns float seal level barometer in feet. | |
float | getSeaLevelBaroM (float known_alt) |
Calculate and returns sea level baro Returns float seal level barometer in meters. | |
uint8_t | calcPT () |
calculate temperature and pressure |
Detailed Description
Create ms5611 controller class.
- Parameters:
-
ms5611 class
Definition at line 101 of file ms5611.h.
Constructor & Destructor Documentation
ms5611 | ( | PinName | sda, |
PinName | scl | ||
) |
Create a MS5611 object using the specified I2C object
- User fixed I2C address 0xEE, CSB pin = 0
- This is the default legacy constructor.
- Parameters:
-
sda - mbed I2C interface pin scl - mbed I2C interface pin
Definition at line 29 of file ms5611.cpp.
ms5611 | ( | PinName | sda, |
PinName | scl, | ||
CSBpolarity | CSBpin | ||
) |
Create a MS5611 object using the specified I2C object
- User defined use of the CSB pin
- CSB pin = 0, user set I2C address to 0xEE
- CSB pin = 1, user set I2C address to 0xEC.
- Parameters:
-
sda - mbed I2C interface pin scl - mbed I2C interface pin ms5611::CSBpin_0 - CSB pin tied to ground ms5611::CSBpin_1 - CSB pin tied to VDD
Definition at line 39 of file ms5611.cpp.
Member Function Documentation
double calcPressure | ( | ) |
Calculate and return compensated barometric pressure Returns double pressure in millibars.
calculate pressure
- Parameters:
-
NONE
- Returns:
- double barometric pressure millibar
Definition at line 359 of file ms5611.cpp.
uint8_t calcPT | ( | ) |
double calcTemp | ( | ) |
Calculate and return compensated temperature Returns double temperature in degC.
calculate temperature
- Parameters:
-
NONE
- Returns:
- double temperature degC
Definition at line 348 of file ms5611.cpp.
void cmd_reset | ( | ) |
Initialize the MS5611 and set up the coefficients First - reset the MS5611 Second - load coefficient values from the MS5611 PROM Third - calculate coefficient checksum This routine only needs to be run once at boot up.
send reset sequence
- Parameters:
-
NONE
- Returns:
- none
Definition at line 134 of file ms5611.cpp.
float getAltitude | ( | ) |
Calculate and returns altitude in feet Returns float altitude in feet.
- Parameters:
-
float known pressure (mB) at sea level
Definition at line 375 of file ms5611.cpp.
float getAltitudeFT | ( | float | sea_pressure ) |
get altitude from known sea level barometer, @ no pre-pressure calculation
float sea level barometer
- Returns:
- float altitude in feet
Definition at line 389 of file ms5611.cpp.
double getPressure | ( | ) |
Return compensated barometric pressure Returns double pressure in millibars DOES NOT RE-CALCULATE FIRST!!! Saves time if you calcTemp(); first.
get pressure, no calculation
- Parameters:
-
NONE
- Returns:
- double barometric pressure millibar
Definition at line 370 of file ms5611.cpp.
float getSeaLevelBaroFT | ( | float | known_alt ) |
Calculate and returns sea level baro Returns float seal level barometer in feet.
get sea level pressure from known altitude(ft), @ no pre-pressure calculation
- Parameters:
-
float known altitude in feet
float known altitude in feet
- Returns:
- float seal level barometer in mb
Definition at line 402 of file ms5611.cpp.
float getSeaLevelBaroM | ( | float | known_alt ) |
Calculate and returns sea level baro Returns float seal level barometer in meters.
get sea level pressure from known altitude(m), @ no pre-pressure calculation
- Parameters:
-
float known altitude in meters
float known altitude in meters
- Returns:
- float seal level barometer in mb
Definition at line 415 of file ms5611.cpp.
Generated on Sun Jul 17 2022 09:44:22 by
