BME680 Library  0.5
Library for the Bosch BME680 Air Quality sensor
bme680_init.c File Reference

Sensor driver for the Bosch BME680 air quality sensor. This library supports i2c and 4-wire SPI connections, reads temperature, pressure, relative humidity, and VOC levels, and provides limited support for adjusting the sensors settings. More...

#include "bme680.h"

Functions

bme680_tbme680_openI2C (i2c *i2c_bus, char i2c_addr)
 Initialize a BME680 sensor into i2c mode. More...
 
bme680_tbme680_openSPI (char pin_sdo, char pin_clk, char pin_sdi, char pin_cs)
 Initialize a BME680 sensor into 4-wire SPI mode. More...
 
void bme680_close (bme680_t *dev)
 Close and free the memory used by the bme680 device structure. More...
 

Detailed Description

Sensor driver for the Bosch BME680 air quality sensor. This library supports i2c and 4-wire SPI connections, reads temperature, pressure, relative humidity, and VOC levels, and provides limited support for adjusting the sensors settings.

Author
Matthew Matz
Version
0.5

Function Documentation

◆ bme680_close()

void bme680_close ( bme680_t dev)

Close and free the memory used by the bme680 device structure.

Parameters
*devpointer to the bme680 device.

◆ bme680_openI2C()

bme680_t* bme680_openI2C ( i2c *  i2c_bus,
char  i2c_addr 
)

Initialize a BME680 sensor into i2c mode.

Parameters
*i2c_buspointer to an i2c bus that has already been opened with i2c_open();.
i2c_addrthe i2c address of the device, usualy 0x76 or 0x77.
Returns
bme680_t device identifier for use with functions in bme680 library.

◆ bme680_openSPI()

bme680_t* bme680_openSPI ( char  pin_sdo,
char  pin_clk,
char  pin_sdi,
char  pin_cs 
)

Initialize a BME680 sensor into 4-wire SPI mode.

Parameters
pin_sdothe BME680's SDO (MISO) pin.
pin_clkthe BME680's CLK (clock) pin.
pin_sdithe BME680's SDI (MOSI) pin.
pin_csthe BME680's CS (select) pin.
Returns
bme680_t device identifier for use with functions in bme680 library.