![]() |
MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
|
A class for interfacing with the BME280 sensor. More...
#include <MiniR4_GroveI2C_BME280.h>
Public Member Functions | |
bool | begin (int i2c_addr=BME280_ADDRESS) |
Initializes the BME280 sensor. | |
float | getTemperature (void) |
Reads the temperature from the BME280 sensor. | |
float | getPressure (void) |
Reads the pressure from the BME280 sensor. | |
float | getHumidity (void) |
Reads the humidity from the BME280 sensor. | |
float | calcAltitude (float pressure) |
Calculates the altitude based on the pressure reading. | |
Public Attributes | |
uint8_t | _ch =0 |
TwoWire * | _pWire |
A class for interfacing with the BME280 sensor.
This class allows reading temperature, pressure, and humidity data from the BME280 sensor. It also provides functions to calculate altitude based on pressure readings.
Definition at line 68 of file MiniR4_GroveI2C_BME280.h.
bool GroveI2C_BME280::begin | ( | int | i2c_addr = BME280_ADDRESS | ) |
Initializes the BME280 sensor.
i2c_addr | The I2C address of the BME280 sensor (default is BME280_ADDRESS). |
Definition at line 16 of file MiniR4_GroveI2C_BME280.cpp.
float GroveI2C_BME280::calcAltitude | ( | float | pressure | ) |
Calculates the altitude based on the pressure reading.
pressure | The pressure in hPa. |
Definition at line 153 of file MiniR4_GroveI2C_BME280.cpp.
float GroveI2C_BME280::getHumidity | ( | void | ) |
Reads the humidity from the BME280 sensor.
Definition at line 123 of file MiniR4_GroveI2C_BME280.cpp.
float GroveI2C_BME280::getPressure | ( | void | ) |
Reads the pressure from the BME280 sensor.
Definition at line 93 of file MiniR4_GroveI2C_BME280.cpp.
float GroveI2C_BME280::getTemperature | ( | void | ) |
Reads the temperature from the BME280 sensor.
Definition at line 67 of file MiniR4_GroveI2C_BME280.cpp.
uint8_t GroveI2C_BME280::_ch =0 |
Definition at line 105 of file MiniR4_GroveI2C_BME280.h.
TwoWire* GroveI2C_BME280::_pWire |
Definition at line 106 of file MiniR4_GroveI2C_BME280.h.