ESP32-P4 OBC Firmware
ESP-IDF firmware for Plant-B CubeSat OBC
 
Loading...
Searching...
No Matches
bme280_sensor.h File Reference

Interface for BME280 environmental sensor over I²C. More...

#include "i2c_bus.h"
#include "bme280.h"
#include "esp_log.h"
#include "esp_err.h"

Go to the source code of this file.

Macros

#define BME280_I2C_ADDR   (0x77)
 Default I²C address for BME280 sensors.
 

Typedefs

typedef uint8_t i2c_addr_t
 Type for I²C addresses.
 
typedef float t_celsius_t
 Type for temperature [°C].
 
typedef float rh_percent_t
 Type for relative humidity [%].
 
typedef float p_hpa_t
 Type for atmospheric pressure [hPa].
 

Functions

bme280_handle_t bme280_i2c_init (i2c_bus_handle_t bus, i2c_addr_t i2c_addr)
 Initialize a BME280 sensor on the specified I2C bus.
 
esp_err_t bme280_i2c_read_measurement (bme280_handle_t sensor, t_celsius_t *t, rh_percent_t *h, p_hpa_t *p)
 Read temperature, humidity, and pressure from a BME280 sensor.
 
void bme280_i2c_delete (bme280_handle_t sensor)
 Deinitialize a BME280 sensor and free associated resources.
 

Detailed Description

Interface for BME280 environmental sensor over I²C.

Author
Adrien Chevrier

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Version
0.1
Date
2026-02-04