27 #include <Adafruit_I2CDevice.h> 28 #include <Adafruit_SPIDevice.h> 29 #include <Adafruit_Sensor.h> 35 #define BME68X_DEFAULT_ADDRESS (0x77) 36 #define BME68X_DEFAULT_SPIFREQ (1000000) 38 #define BME680_OS_16X BME68X_OS_16X 39 #define BME680_OS_8X BME68X_OS_8X 40 #define BME680_OS_4X BME68X_OS_4X 41 #define BME680_OS_2X BME68X_OS_2X 42 #define BME680_OS_1X BME68X_OS_1X 43 #define BME680_OS_NONE BME68X_OS_NONE 45 #define BME680_FILTER_SIZE_127 \ 46 BME68X_FILTER_SIZE_127 47 #define BME680_FILTER_SIZE_63 \ 49 #define BME680_FILTER_SIZE_31 \ 51 #define BME680_FILTER_SIZE_15 \ 53 #define BME680_FILTER_SIZE_7 \ 55 #define BME680_FILTER_SIZE_3 \ 57 #define BME680_FILTER_SIZE_1 \ 59 #define BME680_FILTER_SIZE_0 \ 76 Adafruit_BME680(int8_t cspin, int8_t mosipin, int8_t misopin, int8_t sckpin);
89 bool setGasHeater(uint16_t heaterTemp, uint16_t heaterTime);
115 Adafruit_I2CDevice* _i2cdev = NULL;
116 Adafruit_SPIDevice* _spidev = NULL;
117 TwoWire* _wire = NULL;
120 uint32_t _meas_start = 0;
121 uint16_t _meas_period = 0;
123 struct bme68x_dev gas_sensor;
124 struct bme68x_conf gas_conf;
125 struct bme68x_heatr_conf gas_heatr_conf;
bool setIIRFilterSize(uint8_t fs)
Setter for IIR filter.
Definition: Adafruit_BME680.cpp:537
bool begin(uint8_t addr=BME68X_DEFAULT_ADDRESS, bool initSettings=true)
Initializes the sensor Hardware ss initialized, verifies it is in the I2C or SPI bus, then reads calibration data in preparation for sensor reads.
Definition: Adafruit_BME680.cpp:101
bool setTemperatureOversampling(uint8_t os)
Setter for Temperature oversampling.
Definition: Adafruit_BME680.cpp:470
uint32_t beginReading()
Begin an asynchronous reading.
Definition: Adafruit_BME680.cpp:299
float readTemperature()
Performs a reading and returns the ambient temperature.
Definition: Adafruit_BME680.cpp:233
bool performReading()
Performs a full reading of all 4 sensors in the BME680. Assigns the internal Adafruit_BME680::tempera...
Definition: Adafruit_BME680.cpp:292
bool setGasHeater(uint16_t heaterTemp, uint16_t heaterTime)
Enable and configure gas reading + heater.
Definition: Adafruit_BME680.cpp:420
Definition: Adafruit_BME680.h:65
float readAltitude(float seaLevel)
Calculates the altitude (in meters). Reads the current atmostpheric pressure (in hPa) from the sensor...
Definition: Adafruit_BME680.cpp:273
bool setODR(uint8_t odr)
Setter for Output Data Rate.
Definition: Adafruit_BME680.cpp:447
bool setHumidityOversampling(uint8_t os)
Setter for Humidity oversampling.
Definition: Adafruit_BME680.cpp:492
#define BME68X_DEFAULT_ADDRESS
The default I2C address.
Definition: Adafruit_BME680.h:35
Adafruit_BME680(TwoWire *theWire=&Wire)
Instantiates sensor with i2c.
Definition: Adafruit_BME680.cpp:54
uint32_t readGas()
Calculates the resistance of the MOX gas sensor.
Definition: Adafruit_BME680.cpp:260
static constexpr int reading_not_started
Definition: Adafruit_BME680.h:69
float humidity
Definition: Adafruit_BME680.h:109
static constexpr int reading_complete
Definition: Adafruit_BME680.h:72
float readPressure()
Performs a reading and returns the barometric pressure.
Definition: Adafruit_BME680.cpp:242
float readHumidity()
Performs a reading and returns the relative humidity.
Definition: Adafruit_BME680.cpp:251
float temperature
Definition: Adafruit_BME680.h:103
bool setPressureOversampling(uint8_t os)
Setter for Pressure oversampling.
Definition: Adafruit_BME680.cpp:514
uint32_t gas_resistance
Definition: Adafruit_BME680.h:112
uint32_t pressure
Definition: Adafruit_BME680.h:106
int remainingReadingMillis()
Get remaining time for an asynchronous reading. If the asynchronous reading is still in progress...
Definition: Adafruit_BME680.cpp:403
bool endReading()
End an asynchronous reading. If the asynchronous reading is still in progress, block until it ends...
Definition: Adafruit_BME680.cpp:334