Adafruit MPL115A2 Library
Public Member Functions | List of all members
Adafruit_MPL115A2 Class Reference

Class that stores state and functions for interacting with MPL115A2 barometric pressure sensor. More...

#include <Adafruit_MPL115A2.h>

Public Member Functions

 Adafruit_MPL115A2 ()
 Instantiates a new MPL115A2 class.
 
bool begin ()
 Setups the HW (reads coefficients values, etc.) More...
 
bool begin (TwoWire *theWire)
 Setups the HW (reads coefficients values, etc.) More...
 
bool begin (uint8_t addr)
 Setups the HW (reads coefficients values, etc.) More...
 
bool begin (uint8_t addr, TwoWire *theWire)
 Setups the HW (reads coefficients values, etc.) More...
 
float getPressure ()
 Gets the floating-point pressure level in kPa. More...
 
float getTemperature ()
 Gets the floating-point temperature in Centigrade. More...
 
void getPT (float *P, float *T)
 Gets both at once and saves a little time. More...
 

Detailed Description

Class that stores state and functions for interacting with MPL115A2 barometric pressure sensor.

Member Function Documentation

◆ begin() [1/4]

bool Adafruit_MPL115A2::begin ( )

Setups the HW (reads coefficients values, etc.)

Returns
Returns true if the device was found

◆ begin() [2/4]

bool Adafruit_MPL115A2::begin ( TwoWire *  theWire)

Setups the HW (reads coefficients values, etc.)

Parameters
*theWire
Returns
Returns true if the device was found

◆ begin() [3/4]

bool Adafruit_MPL115A2::begin ( uint8_t  addr)

Setups the HW (reads coefficients values, etc.)

Parameters
addr
Returns
Returns true if the device was found

◆ begin() [4/4]

bool Adafruit_MPL115A2::begin ( uint8_t  addr,
TwoWire *  theWire 
)

Setups the HW (reads coefficients values, etc.)

Parameters
addr
*theWire
Returns
Returns true if the device was found

◆ getPressure()

float Adafruit_MPL115A2::getPressure ( )

Gets the floating-point pressure level in kPa.

Returns
Pressure in kPa

◆ getTemperature()

float Adafruit_MPL115A2::getTemperature ( )

Gets the floating-point temperature in Centigrade.

Returns
Temperature in Centigrade

◆ getPT()

void Adafruit_MPL115A2::getPT ( float *  P,
float *  T 
)

Gets both at once and saves a little time.

Parameters
*PPointer to pressure value
*TPointer to temperature value

The documentation for this class was generated from the following files: