├── LICENSE ├── README.md ├── bsec_bme680 ├── bsec_bme680.c ├── bsec_bme680.py ├── bsec_iaq.config ├── bsec_iaq.state ├── make.config ├── make.sh └── src └── BSEC_1.4.6.0_Generic_Release_20180425 ├── API ├── LICENSE ├── README.md ├── bme680.c ├── bme680.h └── bme680_defs.h ├── Arduino ├── BSEC.zip └── Integration Guidelines for Arduino platforms.pdf ├── BSEC - release notes_1.4.6.0.pdf ├── algo └── bin │ ├── Lite_version │ ├── IAR │ │ ├── IAR_compiling_options.docx │ │ ├── cortex_m0+ │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── cortex_m0 │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── cortex_m3 │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── cortex_m4 │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── cortex_m4f │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ └── cortex_m7 │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ ├── RaspberryPI │ │ ├── PiThree_ArmV8-a-64bits │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.size.log │ │ └── PiZero_ArmV6-32bits │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.size.log │ ├── android │ │ ├── arm32 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── arm64 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── x86_32 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ └── x86_64 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ ├── armcc │ │ ├── Cortex_M0+ │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.lib │ │ │ └── libalgobsec.lib.Size.log │ │ ├── Cortex_M0 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.lib │ │ │ └── libalgobsec.lib.Size.log │ │ ├── Cortex_M3 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.lib │ │ │ └── libalgobsec.lib.Size.log │ │ ├── Cortex_M4 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.lib │ │ │ └── libalgobsec.lib.Size.log │ │ ├── Cortex_M4F │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.lib │ │ │ └── libalgobsec.lib.Size.log │ │ └── Cortex_M7 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.lib │ │ │ └── libalgobsec.lib.Size.log │ ├── avr │ │ ├── AVR32 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── AVR8_XMEGA │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ └── AVR8_megaAVR │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ ├── esp32 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── esp8266 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── gcc │ │ ├── Cortex_A7 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── Cortex_M0+ │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── Cortex_M0 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── Cortex_M3 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── Cortex_M4 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ ├── Cortex_M4F │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ │ └── Cortex_M7 │ │ │ ├── bsec_datatypes.h │ │ │ ├── bsec_interface.h │ │ │ ├── libalgobsec.a │ │ │ └── libalgobsec.a.Size.log │ └── msp430_elf_gcc │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ └── Normal_version │ ├── IAR │ ├── IAR_compiling_options.docx │ ├── cortex_m0+ │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── cortex_m0 │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── cortex_m3 │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.size.log │ ├── cortex_m4 │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.size.log │ ├── cortex_m4f │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.size.log │ └── cortex_m7 │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.size.log │ ├── RaspberryPI │ ├── PiThree_ArmV8-a-64bits │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.size.log │ └── PiZero_ArmV6-32bits │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.size.log │ ├── android │ ├── arm32 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── arm64 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── x86_32 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ └── x86_64 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── armcc │ ├── Cortex_M0+ │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.lib │ │ └── libalgobsec.lib.Size.log │ ├── Cortex_M0 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.lib │ │ └── libalgobsec.lib.Size.log │ ├── Cortex_M3 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.lib │ │ └── libalgobsec.lib.Size.log │ ├── Cortex_M4 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.lib │ │ └── libalgobsec.lib.Size.log │ ├── Cortex_M4F │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.lib │ │ └── libalgobsec.lib.Size.log │ └── Cortex_M7 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.lib │ │ └── libalgobsec.lib.Size.log │ ├── avr │ ├── AVR32 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── AVR8_XMEGA │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ └── AVR8_megaAVR │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── dll │ ├── x64 │ │ ├── BSECLibrary64.dll │ │ ├── BSECLibrary64.exp │ │ ├── BSECLibrary64.lib │ │ └── bseclibrary64.pdb │ └── x86 │ │ ├── BSECLibrary32.dll │ │ ├── BSECLibrary32.exp │ │ ├── BSECLibrary32.lib │ │ └── bseclibrary32.pdb │ ├── esp32 │ ├── bsec_datatypes.h │ ├── bsec_interface.h │ ├── libalgobsec.a │ └── libalgobsec.a.Size.log │ ├── esp8266 │ ├── bsec_datatypes.h │ ├── bsec_interface.h │ ├── libalgobsec.a │ └── libalgobsec.a.Size.log │ ├── gcc │ ├── Cortex_A7 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── Cortex_M0+ │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── Cortex_M0 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── Cortex_M3 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── Cortex_M4 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ ├── Cortex_M4F │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ └── Cortex_M7 │ │ ├── bsec_datatypes.h │ │ ├── bsec_interface.h │ │ ├── libalgobsec.a │ │ └── libalgobsec.a.Size.log │ └── msp430_elf_gcc │ ├── bsec_datatypes.h │ ├── bsec_interface.h │ ├── libalgobsec.a │ └── libalgobsec.a.Size.log ├── config ├── generic_18v_300s_28d │ ├── bsec_iaq.config │ ├── bsec_iaq.csv │ ├── bsec_serialized_configurations_iaq.c │ └── bsec_serialized_configurations_iaq.h ├── generic_18v_300s_4d │ ├── bsec_iaq.config │ ├── bsec_iaq.csv │ ├── bsec_serialized_configurations_iaq.c │ └── bsec_serialized_configurations_iaq.h ├── generic_18v_3s_28d │ ├── bsec_iaq.config │ ├── bsec_iaq.csv │ ├── bsec_serialized_configurations_iaq.c │ └── bsec_serialized_configurations_iaq.h ├── generic_18v_3s_4d │ ├── bsec_iaq.config │ ├── bsec_iaq.csv │ ├── bsec_serialized_configurations_iaq.c │ └── bsec_serialized_configurations_iaq.h ├── generic_33v_300s_28d │ ├── bsec_iaq.config │ ├── bsec_iaq.csv │ ├── bsec_serialized_configurations_iaq.c │ └── bsec_serialized_configurations_iaq.h ├── generic_33v_300s_4d │ ├── bsec_iaq.config │ ├── bsec_iaq.csv │ ├── bsec_serialized_configurations_iaq.c │ └── bsec_serialized_configurations_iaq.h ├── generic_33v_3s_28d │ ├── bsec_iaq.config │ ├── bsec_iaq.csv │ ├── bsec_serialized_configurations_iaq.c │ └── bsec_serialized_configurations_iaq.h └── generic_33v_3s_4d │ ├── bsec_iaq.config │ ├── bsec_iaq.csv │ ├── bsec_serialized_configurations_iaq.c │ └── bsec_serialized_configurations_iaq.h ├── doc ├── BSEC_Binary_Size_Information.pdf └── BST-BME680-AN008-46.pdf └── example ├── bsec_integration.c ├── bsec_integration.h ├── bsec_iot_example.c ├── bsec_iot_example.ino ├── bsec_iot_ulp_plus_example.c └── bsec_iot_ulp_plus_example.ino /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Alex H. 4 | 5 | I2C code from twartzek 2017. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Python script 2 | Starts the C script from within Python, caches the input values and publishes them via MQTT. 3 | 4 | # bsec_bme680_linux Original Readme 5 | 6 | Read the BME680 sensor with the BSEC library on Linux (e.g. Raspberry Pi) 7 | 8 | ## Intro 9 | 10 | Working example of fully using the 11 | [BME680 sensor](https://www.bosch-sensortec.com/en/bst/products/all_products/bme680) 12 | on Linux (e.g. Raspberry Pi) with the precompiled 13 | [BSEC library](https://www.bosch-sensortec.com/bst/products/all_products/bsec), 14 | which allows to read calibrated environment values including an actual Indoor 15 | Air Quality (IAQ) score. 16 | 17 | It makes use of 18 | [Bosch's provided driver](https://github.com/BoschSensortec/BME680_driver) 19 | and can be configured in terms of it. 20 | Readings will be directly output to stdout in a loop. 21 | 22 | ## Prerequisites 23 | 24 | [Download the BSEC software package from Bosch](https://www.bosch-sensortec.com/bst/products/all_products/bsec) 25 | and put it into `./src`, then unpack. 26 | 27 | ## Configure and Compile 28 | 29 | Optionally make changes to make.config. 30 | 31 | Depending on how your sensor is embedded it might be surrounded by other 32 | components giving off heat. Use an offset in °C in `bsec_bme680.c` to 33 | compensate. The default is 5 °C: 34 | ``` 35 | #define temp_offset (5.0f) 36 | ``` 37 | 38 | To compile: `./make.sh` 39 | 40 | ## Usage 41 | 42 | Output will be similar to this: 43 | 44 | ``` 45 | $ ./bsec_bme680 46 | 2017-12-27 18:47:21,[IAQ (1)]: 33.96,[T degC]: 19.61,[H %rH]: 46.41,[P hPa]: 983.39,[G Ohms]: 540924.00,[S]: 0 47 | 2017-12-27 18:47:24,[IAQ (1)]: 45.88,[T degC]: 19.61,[H %rH]: 46.41,[P hPa]: 983.41,[G Ohms]: 535321.00,[S]: 0 48 | 2017-12-27 18:47:26,[IAQ (1)]: 40.65,[T degC]: 19.60,[H %rH]: 46.45,[P hPa]: 983.39,[G Ohms]: 537893.00,[S]: 0 49 | 2017-12-27 18:47:29,[IAQ (1)]: 30.97,[T degC]: 19.60,[H %rH]: 46.42,[P hPa]: 983.41,[G Ohms]: 542672.00,[S]: 0 50 | ``` 51 | * IAQ (n) - Accuracy of the IAQ score from 0 (low) to 3 (high). 52 | * S: n - Return value of the BSEC library 53 | 54 | It can easily be modified in the `output_ready` function. 55 | 56 | The BSEC library is supposed to create an internal state of calibration with 57 | increasing accuracy over time. Each 10.000 samples it will save the internal 58 | calibration state to `./bsec_iaq.state` (or wherever you specify the config 59 | directory to be) so it can pick up where it was after interruption. 60 | 61 | ## Further 62 | 63 | You can find a growing list of tools to further use and visualize the data 64 | [here](https://github.com/alexh-name/bme680_outputs). 65 | 66 | ## Troubleshooting 67 | 68 | ### bsec_bme680 just quits without a message 69 | 70 | Your bsec_iaq.state file might be corrupt or incompatible after an update of the 71 | BSEC library. Try (re)moving it. 72 | 73 | -------------------------------------------------------------------------------- /bsec_bme680: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/bsec_bme680 -------------------------------------------------------------------------------- /bsec_bme680.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2017 alexh.name */ 2 | /* I2C code by twartzek 2017 */ 3 | 4 | /* 5 | * Read the BME680 sensor with the BSEC library by running an endless loop in 6 | * the bsec_iot_loop() function under Linux. 7 | * 8 | */ 9 | 10 | /* header files */ 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include "bsec_datatypes.h" 24 | #include "bsec_integration.h" 25 | #include "bme680.h" 26 | 27 | /* definitions */ 28 | 29 | #define DESTZONE "TZ=Europe/Berlin" 30 | #define temp_offset (5.0f) 31 | #define sample_rate_mode (BSEC_SAMPLE_RATE_LP) 32 | 33 | int g_i2cFid; // I2C Linux device handle 34 | int i2c_address = BME680_I2C_ADDR_PRIMARY; 35 | char *filename_state = "bsec_iaq.state"; 36 | char *filename_config = "bsec_iaq.config"; 37 | 38 | /* functions */ 39 | 40 | // open the Linux device 41 | void i2cOpen() 42 | { 43 | g_i2cFid = open("/dev/i2c-1", O_RDWR); 44 | if (g_i2cFid < 0) { 45 | perror("i2cOpen"); 46 | exit(1); 47 | } 48 | } 49 | 50 | // close the Linux device 51 | void i2cClose() 52 | { 53 | close(g_i2cFid); 54 | } 55 | 56 | // set the I2C slave address for all subsequent I2C device transfers 57 | void i2cSetAddress(int address) 58 | { 59 | if (ioctl(g_i2cFid, I2C_SLAVE, address) < 0) { 60 | perror("i2cSetAddress"); 61 | exit(1); 62 | } 63 | } 64 | 65 | /* 66 | * Write operation in either I2C or SPI 67 | * 68 | * param[in] dev_addr I2C or SPI device address 69 | * param[in] reg_addr register address 70 | * param[in] reg_data_ptr pointer to the data to be written 71 | * param[in] data_len number of bytes to be written 72 | * 73 | * return result of the bus communication function 74 | */ 75 | int8_t bus_write(uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data_ptr, 76 | uint16_t data_len) 77 | { 78 | int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */ 79 | 80 | uint8_t reg[16]; 81 | reg[0]=reg_addr; 82 | 83 | for (int i=1; i n_buffer) { 230 | fprintf(stderr,"%s: %d > %d\n", "binary data bigger than buffer", filesize, 231 | n_buffer); 232 | return 0; 233 | } else { 234 | FILE *file_ptr; 235 | file_ptr = fopen(filename,"rb"); 236 | if (!file_ptr) { 237 | perror("fopen"); 238 | return 0; 239 | } 240 | fseek(file_ptr,offset,SEEK_SET); 241 | copied_bytes = fread(b_buffer,sizeof(char),filesize,file_ptr); 242 | if (copied_bytes == 0) { 243 | fprintf(stderr,"%s\n","binary_load"); 244 | } 245 | fclose(file_ptr); 246 | return copied_bytes; 247 | } 248 | } 249 | 250 | /* 251 | * Load previous library state from non-volatile memory 252 | * 253 | * param[in,out] state_buffer buffer to hold the loaded state string 254 | * param[in] n_buffer size of the allocated state buffer 255 | * 256 | * return number of bytes copied to state_buffer or zero on failure 257 | */ 258 | uint32_t state_load(uint8_t *state_buffer, uint32_t n_buffer) 259 | { 260 | int32_t rslt = 0; 261 | rslt = binary_load(state_buffer, n_buffer, filename_state, 0); 262 | return rslt; 263 | } 264 | 265 | /* 266 | * Save library state to non-volatile memory 267 | * 268 | * param[in] state_buffer buffer holding the state to be stored 269 | * param[in] length length of the state string to be stored 270 | * 271 | * return none 272 | */ 273 | void state_save(const uint8_t *state_buffer, uint32_t length) 274 | { 275 | FILE *state_w_ptr; 276 | state_w_ptr = fopen(filename_state,"wb"); 277 | fwrite(state_buffer,length,1,state_w_ptr); 278 | fclose(state_w_ptr); 279 | } 280 | 281 | /* 282 | * Load library config from non-volatile memory 283 | * 284 | * param[in,out] config_buffer buffer to hold the loaded state string 285 | * param[in] n_buffer size of the allocated state buffer 286 | * 287 | * return number of bytes copied to config_buffer or zero on failure 288 | */ 289 | uint32_t config_load(uint8_t *config_buffer, uint32_t n_buffer) 290 | { 291 | int32_t rslt = 0; 292 | /* 293 | * Provided config file is 4 bytes larger than buffer. 294 | * Apparently skipping the first 4 bytes works fine. 295 | * 296 | */ 297 | rslt = binary_load(config_buffer, n_buffer, filename_config, 4); 298 | return rslt; 299 | } 300 | 301 | /* main */ 302 | 303 | /* 304 | * Main function which configures BSEC library and then reads and processes 305 | * the data from sensor based on timer ticks 306 | * 307 | * return result of the processing 308 | */ 309 | int main() 310 | { 311 | putenv(DESTZONE); // Switch to destination time zone 312 | 313 | i2cOpen(); 314 | i2cSetAddress(i2c_address); 315 | 316 | return_values_init ret; 317 | 318 | ret = bsec_iot_init(sample_rate_mode, temp_offset, bus_write, bus_read, 319 | _sleep, state_load, config_load); 320 | if (ret.bme680_status) { 321 | /* Could not intialize BME680 */ 322 | return (int)ret.bme680_status; 323 | } else if (ret.bsec_status) { 324 | /* Could not intialize BSEC library */ 325 | return (int)ret.bsec_status; 326 | } 327 | 328 | /* Call to endless loop function which reads and processes data based on 329 | * sensor settings. 330 | * State is saved every 10.000 samples, which means every 10.000 * 3 secs 331 | * = 500 minutes (depending on the config). 332 | * 333 | */ 334 | bsec_iot_loop(_sleep, get_timestamp_us, output_ready, state_save, 10000); 335 | 336 | i2cClose(); 337 | return 0; 338 | } 339 | 340 | -------------------------------------------------------------------------------- /bsec_bme680.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import paho.mqtt.publish as publish 3 | import json 4 | from statistics import median 5 | 6 | #Open C File 7 | proc = subprocess.Popen(['./bsec_bme680'], stdout=subprocess.PIPE) 8 | 9 | listIAQ_Accuracy = [] 10 | listPressure = [] 11 | listGas = [] 12 | listTemperature = [] 13 | listIAQ = [] 14 | listHumidity = [] 15 | listStatus = [] 16 | 17 | for line in iter(proc.stdout.readline, ''): 18 | lineJSON = json.loads(line.decode("utf-8")) # process line-by-line 19 | lineDict = dict(lineJSON) 20 | 21 | listIAQ_Accuracy.append(int(lineDict['IAQ_Accuracy'])) 22 | listPressure.append(float(lineDict['Pressure'])) 23 | listGas.append(int(lineDict['Gas'])) 24 | listTemperature.append(float(lineDict['Temperature'])) 25 | listIAQ.append(float(lineDict['IAQ'])) 26 | listHumidity.append(float(lineDict['Humidity'])) 27 | listStatus.append(int(lineDict['Status'])) 28 | 29 | if len(listIAQ_Accuracy) == 20: 30 | #generate the median for each value 31 | IAQ_Accuracy = median(listIAQ_Accuracy) 32 | Pressure = median(listPressure) 33 | Gas = median(listGas) 34 | Temperature = median(listTemperature) 35 | IAQ = median(listIAQ) 36 | Humidity = median(listHumidity) 37 | Status = median(listStatus) 38 | 39 | #clear lists 40 | listIAQ_Accuracy.clear() 41 | listPressure.clear() 42 | listGas.clear() 43 | listTemperature.clear() 44 | listIAQ.clear() 45 | listHumidity.clear() 46 | listStatus.clear() 47 | 48 | #Temperature Offset 49 | Temperature = Temperature + 2 50 | 51 | payload = {"IAQ_Accuracy": IAQ_Accuracy,"IAQ": round(IAQ, 1),"Temperature": round(Temperature, 1),"Humidity": round(Humidity, 1),"Pressure": round(Pressure, 1),"Gas": Gas,"Status": Status} 52 | publish.single("bme680_wohnzimmer", json.dumps(payload), hostname="localhost") 53 | -------------------------------------------------------------------------------- /bsec_iaq.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/bsec_iaq.config -------------------------------------------------------------------------------- /bsec_iaq.state: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/bsec_iaq.state -------------------------------------------------------------------------------- /make.config: -------------------------------------------------------------------------------- 1 | BSEC_DIR='./src/BSEC_1.4.6.0_Generic_Release_20180425' 2 | 3 | VERSION='Normal_version' 4 | 5 | ARCH="${VERSION}/RaspberryPI/PiThree_ArmV8-a-64bits" 6 | 7 | # Other architectures can be found in BSEC_DIR/algo/bin/. 8 | 9 | CONFIG='generic_33v_3s_4d' 10 | 11 | # Other configs are: 12 | # generic_18v_300s_28d 13 | # generic_18v_300s_4d 14 | # generic_18v_3s_28d 15 | # generic_18v_3s_4d 16 | # generic_33v_300s_28d 17 | # generic_33v_300s_4d 18 | # generic_33v_3s_28d 19 | # generic_33v_3s_4d 20 | 21 | CONFIG_DIR='.' 22 | 23 | -------------------------------------------------------------------------------- /make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | . ./make.config 6 | 7 | if [ ! -d "${BSEC_DIR}" ]; then 8 | echo 'BSEC directory missing.' 9 | exit 1 10 | fi 11 | 12 | if [ ! -d "${CONFIG_DIR}" ]; then 13 | mkdir "${CONFIG_DIR}" 14 | fi 15 | 16 | echo 'Compiling...' 17 | cc -Wall -Wno-unused-but-set-variable -Wno-unused-variable -static \ 18 | -iquote"${BSEC_DIR}"/API \ 19 | -iquote"${BSEC_DIR}"/algo/bin/${ARCH} \ 20 | -iquote"${BSEC_DIR}"/example \ 21 | "${BSEC_DIR}"/API/bme680.c \ 22 | "${BSEC_DIR}"/example/bsec_integration.c \ 23 | ./bsec_bme680.c \ 24 | -L"${BSEC_DIR}"/algo/bin/"${ARCH}" -lalgobsec \ 25 | -lm -lrt \ 26 | -o bsec_bme680 27 | echo 'Compiled.' 28 | 29 | cp "${BSEC_DIR}"/config/"${CONFIG}"/bsec_iaq.config "${CONFIG_DIR}"/ 30 | echo 'Copied config.' 31 | 32 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/API/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2017 - 2018 Bosch Sensortec GmbH 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | 9 | Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 13 | Neither the name of the copyright holder nor the names of the 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 19 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER 22 | OR CONTRIBUTORS BE LIABLE FOR ANY 23 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 24 | OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, 25 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 32 | 33 | The information provided is believed to be accurate and reliable. 34 | The copyright holder assumes no responsibility 35 | for the consequences of use 36 | of such information nor for any infringement of patents or 37 | other rights of third parties which may result from its use. 38 | No license is granted by implication or otherwise under any patent or 39 | patent rights of the copyright holder. -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/API/README.md: -------------------------------------------------------------------------------- 1 | # BME680 sensor API 2 | ## Introduction 3 | This package contains the Bosch Sensortec's BME680 gas sensor API 4 | 5 | The sensor driver package includes bme680.h, bme680.c and bme680_defs.h files 6 | 7 | ## Version 8 | File | Version | Date 9 | --------------|---------|------------- 10 | bme680.c | 3.5.8 | 22 Feb 2018 11 | bme680.h | 3.5.8 | 22 Feb 2018 12 | bme680_defs.h | 3.5.8 | 22 Feb 2018 13 | 14 | ## Integration details 15 | * Integrate bme680.h, bme680_defs.h and bme680.c file in to your project. 16 | * Include the bme680.h file in your code like below. 17 | ``` c 18 | #include "bme680.h" 19 | ``` 20 | 21 | ## File information 22 | * bme680_defs.h : This header file has the constants, macros and datatype declarations. 23 | * bme680.h : This header file contains the declarations of the sensor driver APIs. 24 | * bme680.c : This source file contains the definitions of the sensor driver APIs. 25 | 26 | ## Supported sensor interfaces 27 | * SPI 4-wire 28 | * I2C 29 | 30 | ## Usage guide 31 | ### Initializing the sensor 32 | To initialize the sensor, you will first need to create a device structure. You 33 | can do this by creating an instance of the structure bme680_dev. Then go on to 34 | fill in the various parameters as shown below 35 | 36 | #### Example for SPI 4-Wire 37 | ``` c 38 | struct bme680_dev gas_sensor; 39 | 40 | /* You may assign a chip select identifier to be handled later */ 41 | gas_sensor.dev_id = 0; 42 | gas_sensor.intf = BME680_SPI_INTF; 43 | gas_sensor.read = user_spi_read; 44 | gas_sensor.write = user_spi_write; 45 | gas_sensor.delay_ms = user_delay_ms; 46 | /* amb_temp can be set to 25 prior to configuring the gas sensor 47 | * or by performing a few temperature readings without operating the gas sensor. 48 | */ 49 | gas_sensor.amb_temp = 25; 50 | 51 | int8_t rslt = BME680_OK; 52 | rslt = bme680_init(&gas_sensor); 53 | ``` 54 | 55 | #### Example for I2C 56 | ``` c 57 | struct bme680_dev gas_sensor; 58 | 59 | gas_sensor.dev_id = BME680_I2C_ADDR_PRIMARY; 60 | gas_sensor.intf = BME680_I2C_INTF; 61 | gas_sensor.read = user_i2c_read; 62 | gas_sensor.write = user_i2c_write; 63 | gas_sensor.delay_ms = user_delay_ms; 64 | /* amb_temp can be set to 25 prior to configuring the gas sensor 65 | * or by performing a few temperature readings without operating the gas sensor. 66 | */ 67 | gas_sensor.amb_temp = 25; 68 | 69 | 70 | int8_t rslt = BME680_OK; 71 | rslt = bme680_init(&gas_sensor); 72 | ``` 73 | 74 | Regarding compensation functions for temperature, pressure, humidity and gas we have two implementations. 75 | 76 | - Integer version 77 | - floating point version 78 | 79 | By default, Integer version is used in the API 80 | 81 | If the user needs the floating point version, the user has to un-comment BME680_FLOAT_POINT_COMPENSATION macro 82 | in bme680_defs.h file or to add it in the compiler flags. 83 | 84 | ### Configuring the sensor 85 | #### Example for configuring the sensor in forced mode 86 | ``` c 87 | uint8_t set_required_settings; 88 | 89 | /* Set the temperature, pressure and humidity settings */ 90 | gas_sensor.tph_sett.os_hum = BME680_OS_2X; 91 | gas_sensor.tph_sett.os_pres = BME680_OS_4X; 92 | gas_sensor.tph_sett.os_temp = BME680_OS_8X; 93 | gas_sensor.tph_sett.filter = BME680_FILTER_SIZE_3; 94 | 95 | /* Set the remaining gas sensor settings and link the heating profile */ 96 | gas_sensor.gas_sett.run_gas = BME680_ENABLE_GAS_MEAS; 97 | /* Create a ramp heat waveform in 3 steps */ 98 | gas_sensor.gas_sett.heatr_temp = 320; /* degree Celsius */ 99 | gas_sensor.gas_sett.heatr_dur = 150; /* milliseconds */ 100 | 101 | /* Select the power mode */ 102 | /* Must be set before writing the sensor configuration */ 103 | gas_sensor.power_mode = BME680_FORCED_MODE; 104 | 105 | /* Set the required sensor settings needed */ 106 | set_required_settings = BME680_OST_SEL | BME680_OSP_SEL | BME680_OSH_SEL | BME680_FILTER_SEL 107 | | BME680_GAS_SENSOR_SEL; 108 | 109 | /* Set the desired sensor configuration */ 110 | rslt = bme680_set_sensor_settings(set_required_settings,&gas_sensor); 111 | 112 | /* Set the power mode */ 113 | rslt = bme680_set_sensor_mode(&gas_sensor); 114 | 115 | /* Get the total measurement duration so as to sleep or wait till the 116 | * measurement is complete */ 117 | uint16_t meas_period; 118 | bme680_get_profile_dur(&meas_period, &gas_sensor); 119 | user_delay_ms(meas_period); /* Delay till the measurement is ready */ 120 | ``` 121 | 122 | ### Reading sensor data 123 | #### Example for reading all sensor data 124 | ``` c 125 | struct bme680_field_data data; 126 | 127 | while(1) 128 | { 129 | rslt = bme680_get_sensor_data(&data, &gas_sensor); 130 | 131 | printf("T: %.2f degC, P: %.2f hPa, H %.2f %%rH ", data.temperature / 100.0f, 132 | data.pressure / 100.0f, data.humidity / 1000.0f ); 133 | /* Avoid using measurements from an unstable heating setup */ 134 | if(data.status & BME680_GASM_VALID_MSK) 135 | printf(", G: %d ohms", data.gas_resistance); 136 | 137 | printf("\r\n"); 138 | } 139 | ``` 140 | 141 | ### Templates for function pointers 142 | ``` c 143 | 144 | void user_delay_ms(uint32_t period) 145 | { 146 | /* 147 | * Return control or wait, 148 | * for a period amount of milliseconds 149 | */ 150 | } 151 | 152 | int8_t user_spi_read(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len) 153 | { 154 | int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */ 155 | 156 | /* 157 | * The parameter dev_id can be used as a variable to select which Chip Select pin has 158 | * to be set low to activate the relevant device on the SPI bus 159 | */ 160 | 161 | /* 162 | * Data on the bus should be like 163 | * |----------------+---------------------+-------------| 164 | * | MOSI | MISO | Chip Select | 165 | * |----------------+---------------------|-------------| 166 | * | (don't care) | (don't care) | HIGH | 167 | * | (reg_addr) | (don't care) | LOW | 168 | * | (don't care) | (reg_data[0]) | LOW | 169 | * | (....) | (....) | LOW | 170 | * | (don't care) | (reg_data[len - 1]) | LOW | 171 | * | (don't care) | (don't care) | HIGH | 172 | * |----------------+---------------------|-------------| 173 | */ 174 | 175 | return rslt; 176 | } 177 | 178 | int8_t user_spi_write(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len) 179 | { 180 | int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */ 181 | 182 | /* 183 | * The parameter dev_id can be used as a variable to select which Chip Select pin has 184 | * to be set low to activate the relevant device on the SPI bus 185 | */ 186 | 187 | /* 188 | * Data on the bus should be like 189 | * |---------------------+--------------+-------------| 190 | * | MOSI | MISO | Chip Select | 191 | * |---------------------+--------------|-------------| 192 | * | (don't care) | (don't care) | HIGH | 193 | * | (reg_addr) | (don't care) | LOW | 194 | * | (reg_data[0]) | (don't care) | LOW | 195 | * | (....) | (....) | LOW | 196 | * | (reg_data[len - 1]) | (don't care) | LOW | 197 | * | (don't care) | (don't care) | HIGH | 198 | * |---------------------+--------------|-------------| 199 | */ 200 | 201 | return rslt; 202 | } 203 | 204 | int8_t user_i2c_read(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len) 205 | { 206 | int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */ 207 | 208 | /* 209 | * The parameter dev_id can be used as a variable to store the I2C address of the device 210 | */ 211 | 212 | /* 213 | * Data on the bus should be like 214 | * |------------+---------------------| 215 | * | I2C action | Data | 216 | * |------------+---------------------| 217 | * | Start | - | 218 | * | Write | (reg_addr) | 219 | * | Stop | - | 220 | * | Start | - | 221 | * | Read | (reg_data[0]) | 222 | * | Read | (....) | 223 | * | Read | (reg_data[len - 1]) | 224 | * | Stop | - | 225 | * |------------+---------------------| 226 | */ 227 | 228 | return rslt; 229 | } 230 | 231 | int8_t user_i2c_write(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len) 232 | { 233 | int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */ 234 | 235 | /* 236 | * The parameter dev_id can be used as a variable to store the I2C address of the device 237 | */ 238 | 239 | /* 240 | * Data on the bus should be like 241 | * |------------+---------------------| 242 | * | I2C action | Data | 243 | * |------------+---------------------| 244 | * | Start | - | 245 | * | Write | (reg_addr) | 246 | * | Write | (reg_data[0]) | 247 | * | Write | (....) | 248 | * | Write | (reg_data[len - 1]) | 249 | * | Stop | - | 250 | * |------------+---------------------| 251 | */ 252 | 253 | return rslt; 254 | } 255 | 256 | ``` 257 | 258 | ## Copyright (C) 2017 - 2018 Bosch Sensortec GmbH -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/API/bme680.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2017 - 2018 Bosch Sensortec GmbH 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 10 | * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * Neither the name of the copyright holder nor the names of the 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 19 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER 23 | * OR CONTRIBUTORS BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 25 | * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS 32 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 33 | * 34 | * The information provided is believed to be accurate and reliable. 35 | * The copyright holder assumes no responsibility 36 | * for the consequences of use 37 | * of such information nor for any infringement of patents or 38 | * other rights of third parties which may result from its use. 39 | * No license is granted by implication or otherwise under any patent or 40 | * patent rights of the copyright holder. 41 | * 42 | * @file bme680.h 43 | * @date 22 Feb 2018 44 | * @version 3.5.8 45 | * @brief 46 | * 47 | */ 48 | /*! @file bme680.h 49 | @brief Sensor driver for BME680 sensor */ 50 | /*! 51 | * @defgroup BME680 SENSOR API 52 | * @{*/ 53 | #ifndef BME680_H_ 54 | #define BME680_H_ 55 | 56 | /*! CPP guard */ 57 | #ifdef __cplusplus 58 | extern "C" 59 | { 60 | #endif 61 | 62 | /* Header includes */ 63 | #include "bme680_defs.h" 64 | 65 | /* function prototype declarations */ 66 | /*! 67 | * @brief This API is the entry point. 68 | * It reads the chip-id and calibration data from the sensor. 69 | * 70 | * @param[in,out] dev : Structure instance of bme680_dev 71 | * 72 | * @return Result of API execution status 73 | * @retval zero -> Success / +ve value -> Warning / -ve value -> Error 74 | */ 75 | int8_t bme680_init(struct bme680_dev *dev); 76 | 77 | /*! 78 | * @brief This API writes the given data to the register address 79 | * of the sensor. 80 | * 81 | * @param[in] reg_addr : Register address from where the data to be written. 82 | * @param[in] reg_data : Pointer to data buffer which is to be written 83 | * in the sensor. 84 | * @param[in] len : No of bytes of data to write.. 85 | * @param[in] dev : Structure instance of bme680_dev. 86 | * 87 | * @return Result of API execution status 88 | * @retval zero -> Success / +ve value -> Warning / -ve value -> Error 89 | */ 90 | int8_t bme680_set_regs(const uint8_t *reg_addr, const uint8_t *reg_data, uint8_t len, struct bme680_dev *dev); 91 | 92 | /*! 93 | * @brief This API reads the data from the given register address of the sensor. 94 | * 95 | * @param[in] reg_addr : Register address from where the data to be read 96 | * @param[out] reg_data : Pointer to data buffer to store the read data. 97 | * @param[in] len : No of bytes of data to be read. 98 | * @param[in] dev : Structure instance of bme680_dev. 99 | * 100 | * @return Result of API execution status 101 | * @retval zero -> Success / +ve value -> Warning / -ve value -> Error 102 | */ 103 | int8_t bme680_get_regs(uint8_t reg_addr, uint8_t *reg_data, uint16_t len, struct bme680_dev *dev); 104 | 105 | /*! 106 | * @brief This API performs the soft reset of the sensor. 107 | * 108 | * @param[in] dev : Structure instance of bme680_dev. 109 | * 110 | * @return Result of API execution status 111 | * @retval zero -> Success / +ve value -> Warning / -ve value -> Error. 112 | */ 113 | int8_t bme680_soft_reset(struct bme680_dev *dev); 114 | 115 | /*! 116 | * @brief This API is used to set the power mode of the sensor. 117 | * 118 | * @param[in] dev : Structure instance of bme680_dev 119 | * @note : Pass the value to bme680_dev.power_mode structure variable. 120 | * 121 | * value | mode 122 | * -------------|------------------ 123 | * 0x00 | BME680_SLEEP_MODE 124 | * 0x01 | BME680_FORCED_MODE 125 | * 126 | * * @return Result of API execution status 127 | * @retval zero -> Success / +ve value -> Warning / -ve value -> Error 128 | */ 129 | int8_t bme680_set_sensor_mode(struct bme680_dev *dev); 130 | 131 | /*! 132 | * @brief This API is used to get the power mode of the sensor. 133 | * 134 | * @param[in] dev : Structure instance of bme680_dev 135 | * @note : bme680_dev.power_mode structure variable hold the power mode. 136 | * 137 | * value | mode 138 | * ---------|------------------ 139 | * 0x00 | BME680_SLEEP_MODE 140 | * 0x01 | BME680_FORCED_MODE 141 | * 142 | * @return Result of API execution status 143 | * @retval zero -> Success / +ve value -> Warning / -ve value -> Error 144 | */ 145 | int8_t bme680_get_sensor_mode(struct bme680_dev *dev); 146 | 147 | /*! 148 | * @brief This API is used to set the profile duration of the sensor. 149 | * 150 | * @param[in] dev : Structure instance of bme680_dev. 151 | * @param[in] duration : Duration of the measurement in ms. 152 | * 153 | * @return Nothing 154 | */ 155 | void bme680_set_profile_dur(uint16_t duration, struct bme680_dev *dev); 156 | 157 | /*! 158 | * @brief This API is used to get the profile duration of the sensor. 159 | * 160 | * @param[in] dev : Structure instance of bme680_dev. 161 | * @param[in] duration : Duration of the measurement in ms. 162 | * 163 | * @return Nothing 164 | */ 165 | void bme680_get_profile_dur(uint16_t *duration, const struct bme680_dev *dev); 166 | 167 | /*! 168 | * @brief This API reads the pressure, temperature and humidity and gas data 169 | * from the sensor, compensates the data and store it in the bme680_data 170 | * structure instance passed by the user. 171 | * 172 | * @param[out] data: Structure instance to hold the data. 173 | * @param[in] dev : Structure instance of bme680_dev. 174 | * 175 | * @return Result of API execution status 176 | * @retval zero -> Success / +ve value -> Warning / -ve value -> Error 177 | */ 178 | int8_t bme680_get_sensor_data(struct bme680_field_data *data, struct bme680_dev *dev); 179 | 180 | /*! 181 | * @brief This API is used to set the oversampling, filter and T,P,H, gas selection 182 | * settings in the sensor. 183 | * 184 | * @param[in] dev : Structure instance of bme680_dev. 185 | * @param[in] desired_settings : Variable used to select the settings which 186 | * are to be set in the sensor. 187 | * 188 | * Macros | Functionality 189 | *---------------------------------|---------------------------------------------- 190 | * BME680_OST_SEL | To set temperature oversampling. 191 | * BME680_OSP_SEL | To set pressure oversampling. 192 | * BME680_OSH_SEL | To set humidity oversampling. 193 | * BME680_GAS_MEAS_SEL | To set gas measurement setting. 194 | * BME680_FILTER_SEL | To set filter setting. 195 | * BME680_HCNTRL_SEL | To set humidity control setting. 196 | * BME680_RUN_GAS_SEL | To set run gas setting. 197 | * BME680_NBCONV_SEL | To set NB conversion setting. 198 | * BME680_GAS_SENSOR_SEL | To set all gas sensor related settings 199 | * 200 | * @note : Below are the macros to be used by the user for selecting the 201 | * desired settings. User can do OR operation of these macros for configuring 202 | * multiple settings. 203 | * 204 | * @return Result of API execution status 205 | * @retval zero -> Success / +ve value -> Warning / -ve value -> Error. 206 | */ 207 | int8_t bme680_set_sensor_settings(uint16_t desired_settings, struct bme680_dev *dev); 208 | 209 | /*! 210 | * @brief This API is used to get the oversampling, filter and T,P,H, gas selection 211 | * settings in the sensor. 212 | * 213 | * @param[in] dev : Structure instance of bme680_dev. 214 | * @param[in] desired_settings : Variable used to select the settings which 215 | * are to be get from the sensor. 216 | * 217 | * @return Result of API execution status 218 | * @retval zero -> Success / +ve value -> Warning / -ve value -> Error. 219 | */ 220 | int8_t bme680_get_sensor_settings(uint16_t desired_settings, struct bme680_dev *dev); 221 | #ifdef __cplusplus 222 | } 223 | #endif /* End of CPP guard */ 224 | #endif /* BME680_H_ */ 225 | /** @}*/ 226 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/API/bme680_defs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2017 - 2018 Bosch Sensortec GmbH 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 10 | * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * Neither the name of the copyright holder nor the names of the 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 19 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER 23 | * OR CONTRIBUTORS BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 25 | * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS 32 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 33 | * 34 | * The information provided is believed to be accurate and reliable. 35 | * The copyright holder assumes no responsibility 36 | * for the consequences of use 37 | * of such information nor for any infringement of patents or 38 | * other rights of third parties which may result from its use. 39 | * No license is granted by implication or otherwise under any patent or 40 | * patent rights of the copyright holder. 41 | * 42 | * @file bme680_defs.h 43 | * @date 22 Feb 2018 44 | * @version 3.5.8 45 | * @brief 46 | * 47 | */ 48 | 49 | /*! @file bme680_defs.h 50 | @brief Sensor driver for BME680 sensor */ 51 | /*! 52 | * @defgroup BME680 SENSOR API 53 | * @brief 54 | * @{*/ 55 | #ifndef BME680_DEFS_H_ 56 | #define BME680_DEFS_H_ 57 | 58 | /********************************************************/ 59 | /* header includes */ 60 | #ifdef __KERNEL__ 61 | #include 62 | #include 63 | #else 64 | #include 65 | #include 66 | #endif 67 | 68 | /******************************************************************************/ 69 | /*! @name Common macros */ 70 | /******************************************************************************/ 71 | 72 | #if !defined(UINT8_C) && !defined(INT8_C) 73 | #define INT8_C(x) S8_C(x) 74 | #define UINT8_C(x) U8_C(x) 75 | #endif 76 | 77 | #if !defined(UINT16_C) && !defined(INT16_C) 78 | #define INT16_C(x) S16_C(x) 79 | #define UINT16_C(x) U16_C(x) 80 | #endif 81 | 82 | #if !defined(INT32_C) && !defined(UINT32_C) 83 | #define INT32_C(x) S32_C(x) 84 | #define UINT32_C(x) U32_C(x) 85 | #endif 86 | 87 | #if !defined(INT64_C) && !defined(UINT64_C) 88 | #define INT64_C(x) S64_C(x) 89 | #define UINT64_C(x) U64_C(x) 90 | #endif 91 | 92 | /**@}*/ 93 | 94 | /**\name C standard macros */ 95 | #ifndef NULL 96 | #ifdef __cplusplus 97 | #define NULL 0 98 | #else 99 | #define NULL ((void *) 0) 100 | #endif 101 | #endif 102 | 103 | /** BME680 configuration macros */ 104 | /** Enable or un-comment the macro to provide floating point data output */ 105 | #ifndef BME680_FLOAT_POINT_COMPENSATION 106 | /* #define BME680_FLOAT_POINT_COMPENSATION */ 107 | #endif 108 | 109 | /** BME680 General config */ 110 | #define BME680_POLL_PERIOD_MS UINT8_C(10) 111 | 112 | /** BME680 I2C addresses */ 113 | #define BME680_I2C_ADDR_PRIMARY UINT8_C(0x76) 114 | #define BME680_I2C_ADDR_SECONDARY UINT8_C(0x77) 115 | 116 | /** BME680 unique chip identifier */ 117 | #define BME680_CHIP_ID UINT8_C(0x61) 118 | 119 | /** BME680 coefficients related defines */ 120 | #define BME680_COEFF_SIZE UINT8_C(41) 121 | #define BME680_COEFF_ADDR1_LEN UINT8_C(25) 122 | #define BME680_COEFF_ADDR2_LEN UINT8_C(16) 123 | 124 | /** BME680 field_x related defines */ 125 | #define BME680_FIELD_LENGTH UINT8_C(15) 126 | #define BME680_FIELD_ADDR_OFFSET UINT8_C(17) 127 | 128 | /** Soft reset command */ 129 | #define BME680_SOFT_RESET_CMD UINT8_C(0xb6) 130 | 131 | /** Error code definitions */ 132 | #define BME680_OK INT8_C(0) 133 | /* Errors */ 134 | #define BME680_E_NULL_PTR INT8_C(-1) 135 | #define BME680_E_COM_FAIL INT8_C(-2) 136 | #define BME680_E_DEV_NOT_FOUND INT8_C(-3) 137 | #define BME680_E_INVALID_LENGTH INT8_C(-4) 138 | 139 | /* Warnings */ 140 | #define BME680_W_DEFINE_PWR_MODE INT8_C(1) 141 | #define BME680_W_NO_NEW_DATA INT8_C(2) 142 | 143 | /* Info's */ 144 | #define BME680_I_MIN_CORRECTION UINT8_C(1) 145 | #define BME680_I_MAX_CORRECTION UINT8_C(2) 146 | 147 | /** Register map */ 148 | /** Other coefficient's address */ 149 | #define BME680_ADDR_RES_HEAT_VAL_ADDR UINT8_C(0x00) 150 | #define BME680_ADDR_RES_HEAT_RANGE_ADDR UINT8_C(0x02) 151 | #define BME680_ADDR_RANGE_SW_ERR_ADDR UINT8_C(0x04) 152 | #define BME680_ADDR_SENS_CONF_START UINT8_C(0x5A) 153 | #define BME680_ADDR_GAS_CONF_START UINT8_C(0x64) 154 | 155 | /** Field settings */ 156 | #define BME680_FIELD0_ADDR UINT8_C(0x1d) 157 | 158 | /** Heater settings */ 159 | #define BME680_RES_HEAT0_ADDR UINT8_C(0x5a) 160 | #define BME680_GAS_WAIT0_ADDR UINT8_C(0x64) 161 | 162 | /** Sensor configuration registers */ 163 | #define BME680_CONF_HEAT_CTRL_ADDR UINT8_C(0x70) 164 | #define BME680_CONF_ODR_RUN_GAS_NBC_ADDR UINT8_C(0x71) 165 | #define BME680_CONF_OS_H_ADDR UINT8_C(0x72) 166 | #define BME680_MEM_PAGE_ADDR UINT8_C(0xf3) 167 | #define BME680_CONF_T_P_MODE_ADDR UINT8_C(0x74) 168 | #define BME680_CONF_ODR_FILT_ADDR UINT8_C(0x75) 169 | 170 | /** Coefficient's address */ 171 | #define BME680_COEFF_ADDR1 UINT8_C(0x89) 172 | #define BME680_COEFF_ADDR2 UINT8_C(0xe1) 173 | 174 | /** Chip identifier */ 175 | #define BME680_CHIP_ID_ADDR UINT8_C(0xd0) 176 | 177 | /** Soft reset register */ 178 | #define BME680_SOFT_RESET_ADDR UINT8_C(0xe0) 179 | 180 | /** Heater control settings */ 181 | #define BME680_ENABLE_HEATER UINT8_C(0x00) 182 | #define BME680_DISABLE_HEATER UINT8_C(0x08) 183 | 184 | /** Gas measurement settings */ 185 | #define BME680_DISABLE_GAS_MEAS UINT8_C(0x00) 186 | #define BME680_ENABLE_GAS_MEAS UINT8_C(0x01) 187 | 188 | /** Over-sampling settings */ 189 | #define BME680_OS_NONE UINT8_C(0) 190 | #define BME680_OS_1X UINT8_C(1) 191 | #define BME680_OS_2X UINT8_C(2) 192 | #define BME680_OS_4X UINT8_C(3) 193 | #define BME680_OS_8X UINT8_C(4) 194 | #define BME680_OS_16X UINT8_C(5) 195 | 196 | /** IIR filter settings */ 197 | #define BME680_FILTER_SIZE_0 UINT8_C(0) 198 | #define BME680_FILTER_SIZE_1 UINT8_C(1) 199 | #define BME680_FILTER_SIZE_3 UINT8_C(2) 200 | #define BME680_FILTER_SIZE_7 UINT8_C(3) 201 | #define BME680_FILTER_SIZE_15 UINT8_C(4) 202 | #define BME680_FILTER_SIZE_31 UINT8_C(5) 203 | #define BME680_FILTER_SIZE_63 UINT8_C(6) 204 | #define BME680_FILTER_SIZE_127 UINT8_C(7) 205 | 206 | /** Power mode settings */ 207 | #define BME680_SLEEP_MODE UINT8_C(0) 208 | #define BME680_FORCED_MODE UINT8_C(1) 209 | 210 | /** Delay related macro declaration */ 211 | #define BME680_RESET_PERIOD UINT32_C(10) 212 | 213 | /** SPI memory page settings */ 214 | #define BME680_MEM_PAGE0 UINT8_C(0x10) 215 | #define BME680_MEM_PAGE1 UINT8_C(0x00) 216 | 217 | /** Ambient humidity shift value for compensation */ 218 | #define BME680_HUM_REG_SHIFT_VAL UINT8_C(4) 219 | 220 | /** Run gas enable and disable settings */ 221 | #define BME680_RUN_GAS_DISABLE UINT8_C(0) 222 | #define BME680_RUN_GAS_ENABLE UINT8_C(1) 223 | 224 | /** Buffer length macro declaration */ 225 | #define BME680_TMP_BUFFER_LENGTH UINT8_C(40) 226 | #define BME680_REG_BUFFER_LENGTH UINT8_C(6) 227 | #define BME680_FIELD_DATA_LENGTH UINT8_C(3) 228 | #define BME680_GAS_REG_BUF_LENGTH UINT8_C(20) 229 | 230 | /** Settings selector */ 231 | #define BME680_OST_SEL UINT16_C(1) 232 | #define BME680_OSP_SEL UINT16_C(2) 233 | #define BME680_OSH_SEL UINT16_C(4) 234 | #define BME680_GAS_MEAS_SEL UINT16_C(8) 235 | #define BME680_FILTER_SEL UINT16_C(16) 236 | #define BME680_HCNTRL_SEL UINT16_C(32) 237 | #define BME680_RUN_GAS_SEL UINT16_C(64) 238 | #define BME680_NBCONV_SEL UINT16_C(128) 239 | #define BME680_GAS_SENSOR_SEL (BME680_GAS_MEAS_SEL | BME680_RUN_GAS_SEL | BME680_NBCONV_SEL) 240 | 241 | /** Number of conversion settings*/ 242 | #define BME680_NBCONV_MIN UINT8_C(0) 243 | #define BME680_NBCONV_MAX UINT8_C(10) 244 | 245 | /** Mask definitions */ 246 | #define BME680_GAS_MEAS_MSK UINT8_C(0x30) 247 | #define BME680_NBCONV_MSK UINT8_C(0X0F) 248 | #define BME680_FILTER_MSK UINT8_C(0X1C) 249 | #define BME680_OST_MSK UINT8_C(0XE0) 250 | #define BME680_OSP_MSK UINT8_C(0X1C) 251 | #define BME680_OSH_MSK UINT8_C(0X07) 252 | #define BME680_HCTRL_MSK UINT8_C(0x08) 253 | #define BME680_RUN_GAS_MSK UINT8_C(0x10) 254 | #define BME680_MODE_MSK UINT8_C(0x03) 255 | #define BME680_RHRANGE_MSK UINT8_C(0x30) 256 | #define BME680_RSERROR_MSK UINT8_C(0xf0) 257 | #define BME680_NEW_DATA_MSK UINT8_C(0x80) 258 | #define BME680_GAS_INDEX_MSK UINT8_C(0x0f) 259 | #define BME680_GAS_RANGE_MSK UINT8_C(0x0f) 260 | #define BME680_GASM_VALID_MSK UINT8_C(0x20) 261 | #define BME680_HEAT_STAB_MSK UINT8_C(0x10) 262 | #define BME680_MEM_PAGE_MSK UINT8_C(0x10) 263 | #define BME680_SPI_RD_MSK UINT8_C(0x80) 264 | #define BME680_SPI_WR_MSK UINT8_C(0x7f) 265 | #define BME680_BIT_H1_DATA_MSK UINT8_C(0x0F) 266 | 267 | /** Bit position definitions for sensor settings */ 268 | #define BME680_GAS_MEAS_POS UINT8_C(4) 269 | #define BME680_FILTER_POS UINT8_C(2) 270 | #define BME680_OST_POS UINT8_C(5) 271 | #define BME680_OSP_POS UINT8_C(2) 272 | #define BME680_RUN_GAS_POS UINT8_C(4) 273 | 274 | /** Array Index to Field data mapping for Calibration Data*/ 275 | #define BME680_T2_LSB_REG (1) 276 | #define BME680_T2_MSB_REG (2) 277 | #define BME680_T3_REG (3) 278 | #define BME680_P1_LSB_REG (5) 279 | #define BME680_P1_MSB_REG (6) 280 | #define BME680_P2_LSB_REG (7) 281 | #define BME680_P2_MSB_REG (8) 282 | #define BME680_P3_REG (9) 283 | #define BME680_P4_LSB_REG (11) 284 | #define BME680_P4_MSB_REG (12) 285 | #define BME680_P5_LSB_REG (13) 286 | #define BME680_P5_MSB_REG (14) 287 | #define BME680_P7_REG (15) 288 | #define BME680_P6_REG (16) 289 | #define BME680_P8_LSB_REG (19) 290 | #define BME680_P8_MSB_REG (20) 291 | #define BME680_P9_LSB_REG (21) 292 | #define BME680_P9_MSB_REG (22) 293 | #define BME680_P10_REG (23) 294 | #define BME680_H2_MSB_REG (25) 295 | #define BME680_H2_LSB_REG (26) 296 | #define BME680_H1_LSB_REG (26) 297 | #define BME680_H1_MSB_REG (27) 298 | #define BME680_H3_REG (28) 299 | #define BME680_H4_REG (29) 300 | #define BME680_H5_REG (30) 301 | #define BME680_H6_REG (31) 302 | #define BME680_H7_REG (32) 303 | #define BME680_T1_LSB_REG (33) 304 | #define BME680_T1_MSB_REG (34) 305 | #define BME680_GH2_LSB_REG (35) 306 | #define BME680_GH2_MSB_REG (36) 307 | #define BME680_GH1_REG (37) 308 | #define BME680_GH3_REG (38) 309 | 310 | /** BME680 register buffer index settings*/ 311 | #define BME680_REG_FILTER_INDEX UINT8_C(5) 312 | #define BME680_REG_TEMP_INDEX UINT8_C(4) 313 | #define BME680_REG_PRES_INDEX UINT8_C(4) 314 | #define BME680_REG_HUM_INDEX UINT8_C(2) 315 | #define BME680_REG_NBCONV_INDEX UINT8_C(1) 316 | #define BME680_REG_RUN_GAS_INDEX UINT8_C(1) 317 | #define BME680_REG_HCTRL_INDEX UINT8_C(0) 318 | 319 | /** BME680 pressure calculation macros */ 320 | /*! This max value is used to provide precedence to multiplication or division 321 | * in pressure compensation equation to achieve least loss of precision and 322 | * avoiding overflows. 323 | * i.e Comparing value, BME680_MAX_OVERFLOW_VAL = INT32_C(1 << 30) 324 | */ 325 | #define BME680_MAX_OVERFLOW_VAL INT32_C(0x40000000) 326 | 327 | /** Macro to combine two 8 bit data's to form a 16 bit data */ 328 | #define BME680_CONCAT_BYTES(msb, lsb) (((uint16_t)msb << 8) | (uint16_t)lsb) 329 | 330 | /** Macro to SET and GET BITS of a register */ 331 | #define BME680_SET_BITS(reg_data, bitname, data) \ 332 | ((reg_data & ~(bitname##_MSK)) | \ 333 | ((data << bitname##_POS) & bitname##_MSK)) 334 | #define BME680_GET_BITS(reg_data, bitname) ((reg_data & (bitname##_MSK)) >> \ 335 | (bitname##_POS)) 336 | 337 | /** Macro variant to handle the bitname position if it is zero */ 338 | #define BME680_SET_BITS_POS_0(reg_data, bitname, data) \ 339 | ((reg_data & ~(bitname##_MSK)) | \ 340 | (data & bitname##_MSK)) 341 | #define BME680_GET_BITS_POS_0(reg_data, bitname) (reg_data & (bitname##_MSK)) 342 | 343 | /** Type definitions */ 344 | /*! 345 | * Generic communication function pointer 346 | * @param[in] dev_id: Place holder to store the id of the device structure 347 | * Can be used to store the index of the Chip select or 348 | * I2C address of the device. 349 | * @param[in] reg_addr: Used to select the register the where data needs to 350 | * be read from or written to. 351 | * @param[in/out] reg_data: Data array to read/write 352 | * @param[in] len: Length of the data array 353 | */ 354 | typedef int8_t (*bme680_com_fptr_t)(uint8_t dev_id, uint8_t reg_addr, uint8_t *data, uint16_t len); 355 | 356 | /*! 357 | * Delay function pointer 358 | * @param[in] period: Time period in milliseconds 359 | */ 360 | typedef void (*bme680_delay_fptr_t)(uint32_t period); 361 | 362 | /*! 363 | * @brief Interface selection Enumerations 364 | */ 365 | enum bme680_intf { 366 | /*! SPI interface */ 367 | BME680_SPI_INTF, 368 | /*! I2C interface */ 369 | BME680_I2C_INTF 370 | }; 371 | 372 | /* structure definitions */ 373 | /*! 374 | * @brief Sensor field data structure 375 | */ 376 | struct bme680_field_data { 377 | /*! Contains new_data, gasm_valid & heat_stab */ 378 | uint8_t status; 379 | /*! The index of the heater profile used */ 380 | uint8_t gas_index; 381 | /*! Measurement index to track order */ 382 | uint8_t meas_index; 383 | 384 | #ifndef BME680_FLOAT_POINT_COMPENSATION 385 | /*! Temperature in degree celsius x100 */ 386 | int16_t temperature; 387 | /*! Pressure in Pascal */ 388 | uint32_t pressure; 389 | /*! Humidity in % relative humidity x1000 */ 390 | uint32_t humidity; 391 | /*! Gas resistance in Ohms */ 392 | uint32_t gas_resistance; 393 | #else 394 | /*! Temperature in degree celsius */ 395 | float temperature; 396 | /*! Pressure in Pascal */ 397 | float pressure; 398 | /*! Humidity in % relative humidity x1000 */ 399 | float humidity; 400 | /*! Gas resistance in Ohms */ 401 | float gas_resistance; 402 | 403 | #endif 404 | 405 | }; 406 | 407 | /*! 408 | * @brief Structure to hold the Calibration data 409 | */ 410 | struct bme680_calib_data { 411 | /*! Variable to store calibrated humidity data */ 412 | uint16_t par_h1; 413 | /*! Variable to store calibrated humidity data */ 414 | uint16_t par_h2; 415 | /*! Variable to store calibrated humidity data */ 416 | int8_t par_h3; 417 | /*! Variable to store calibrated humidity data */ 418 | int8_t par_h4; 419 | /*! Variable to store calibrated humidity data */ 420 | int8_t par_h5; 421 | /*! Variable to store calibrated humidity data */ 422 | uint8_t par_h6; 423 | /*! Variable to store calibrated humidity data */ 424 | int8_t par_h7; 425 | /*! Variable to store calibrated gas data */ 426 | int8_t par_gh1; 427 | /*! Variable to store calibrated gas data */ 428 | int16_t par_gh2; 429 | /*! Variable to store calibrated gas data */ 430 | int8_t par_gh3; 431 | /*! Variable to store calibrated temperature data */ 432 | uint16_t par_t1; 433 | /*! Variable to store calibrated temperature data */ 434 | int16_t par_t2; 435 | /*! Variable to store calibrated temperature data */ 436 | int8_t par_t3; 437 | /*! Variable to store calibrated pressure data */ 438 | uint16_t par_p1; 439 | /*! Variable to store calibrated pressure data */ 440 | int16_t par_p2; 441 | /*! Variable to store calibrated pressure data */ 442 | int8_t par_p3; 443 | /*! Variable to store calibrated pressure data */ 444 | int16_t par_p4; 445 | /*! Variable to store calibrated pressure data */ 446 | int16_t par_p5; 447 | /*! Variable to store calibrated pressure data */ 448 | int8_t par_p6; 449 | /*! Variable to store calibrated pressure data */ 450 | int8_t par_p7; 451 | /*! Variable to store calibrated pressure data */ 452 | int16_t par_p8; 453 | /*! Variable to store calibrated pressure data */ 454 | int16_t par_p9; 455 | /*! Variable to store calibrated pressure data */ 456 | uint8_t par_p10; 457 | 458 | #ifndef BME680_FLOAT_POINT_COMPENSATION 459 | /*! Variable to store t_fine size */ 460 | int32_t t_fine; 461 | #else 462 | /*! Variable to store t_fine size */ 463 | float t_fine; 464 | #endif 465 | /*! Variable to store heater resistance range */ 466 | uint8_t res_heat_range; 467 | /*! Variable to store heater resistance value */ 468 | int8_t res_heat_val; 469 | /*! Variable to store error range */ 470 | int8_t range_sw_err; 471 | }; 472 | 473 | /*! 474 | * @brief BME680 sensor settings structure which comprises of ODR, 475 | * over-sampling and filter settings. 476 | */ 477 | struct bme680_tph_sett { 478 | /*! Humidity oversampling */ 479 | uint8_t os_hum; 480 | /*! Temperature oversampling */ 481 | uint8_t os_temp; 482 | /*! Pressure oversampling */ 483 | uint8_t os_pres; 484 | /*! Filter coefficient */ 485 | uint8_t filter; 486 | }; 487 | 488 | /*! 489 | * @brief BME680 gas sensor which comprises of gas settings 490 | * and status parameters 491 | */ 492 | struct bme680_gas_sett { 493 | /*! Variable to store nb conversion */ 494 | uint8_t nb_conv; 495 | /*! Variable to store heater control */ 496 | uint8_t heatr_ctrl; 497 | /*! Run gas enable value */ 498 | uint8_t run_gas; 499 | /*! Heater temperature value */ 500 | uint16_t heatr_temp; 501 | /*! Duration profile value */ 502 | uint16_t heatr_dur; 503 | }; 504 | 505 | /*! 506 | * @brief BME680 device structure 507 | */ 508 | struct bme680_dev { 509 | /*! Chip Id */ 510 | uint8_t chip_id; 511 | /*! Device Id */ 512 | uint8_t dev_id; 513 | /*! SPI/I2C interface */ 514 | enum bme680_intf intf; 515 | /*! Memory page used */ 516 | uint8_t mem_page; 517 | /*! Ambient temperature in Degree C */ 518 | int8_t amb_temp; 519 | /*! Sensor calibration data */ 520 | struct bme680_calib_data calib; 521 | /*! Sensor settings */ 522 | struct bme680_tph_sett tph_sett; 523 | /*! Gas Sensor settings */ 524 | struct bme680_gas_sett gas_sett; 525 | /*! Sensor power modes */ 526 | uint8_t power_mode; 527 | /*! New sensor fields */ 528 | uint8_t new_fields; 529 | /*! Store the info messages */ 530 | uint8_t info_msg; 531 | /*! Bus read function pointer */ 532 | bme680_com_fptr_t read; 533 | /*! Bus write function pointer */ 534 | bme680_com_fptr_t write; 535 | /*! delay function pointer */ 536 | bme680_delay_fptr_t delay_ms; 537 | /*! Communication function result */ 538 | int8_t com_rslt; 539 | }; 540 | 541 | 542 | 543 | #endif /* BME680_DEFS_H_ */ 544 | /** @}*/ 545 | /** @}*/ 546 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/Arduino/BSEC.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/Arduino/BSEC.zip -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/Arduino/Integration Guidelines for Arduino platforms.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/Arduino/Integration Guidelines for Arduino platforms.pdf -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/BSEC - release notes_1.4.6.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/BSEC - release notes_1.4.6.0.pdf -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/IAR_compiling_options.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/IAR_compiling_options.docx -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m0+/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m0+/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m0+/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12768 0 984 13752 35b8 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m0/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m0/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m0/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12768 0 984 13752 35b8 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m3/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m3/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m3/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 11996 0 984 12980 32b4 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m4/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m4/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m4/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12004 0 984 12988 32bc (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m4f/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m4f/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m4f/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12634 0 984 13618 3532 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m7/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m7/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/IAR/cortex_m7/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12016 0 984 13000 32c8 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/RaspberryPI/PiThree_ArmV8-a-64bits/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/RaspberryPI/PiThree_ArmV8-a-64bits/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/RaspberryPI/PiThree_ArmV8-a-64bits/libalgobsec.a.size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 61876 0 984 62860 f58c (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/RaspberryPI/PiZero_ArmV6-32bits/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/RaspberryPI/PiZero_ArmV6-32bits/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/RaspberryPI/PiZero_ArmV6-32bits/libalgobsec.a.size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 61332 0 984 62316 f36c (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/arm32/bsec_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015, 2016, 2017 Robert Bosch. All Rights Reserved. 3 | * 4 | * Disclaimer 5 | * 6 | * Common: 7 | * Bosch Sensortec products are developed for the consumer goods industry. They may only be used 8 | * within the parameters of the respective valid product data sheet. Bosch Sensortec products are 9 | * provided with the express understanding that there is no warranty of fitness for a particular purpose. 10 | * They are not fit for use in life-sustaining, safety or security sensitive systems or any system or device 11 | * that may lead to bodily harm or property damage if the system or device malfunctions. In addition, 12 | * Bosch Sensortec products are not fit for use in products which interact with motor vehicle systems. 13 | * The resale and/or use of products are at the purchasers own risk and his own responsibility. The 14 | * examination of fitness for the intended use is the sole responsibility of the Purchaser. 15 | * 16 | * The purchaser shall indemnify Bosch Sensortec from all third party claims, including any claims for 17 | * incidental, or consequential damages, arising from any product use not covered by the parameters of 18 | * the respective valid product data sheet or not approved by Bosch Sensortec and reimburse Bosch 19 | * Sensortec for all costs in connection with such claims. 20 | * 21 | * The purchaser must monitor the market for the purchased products, particularly with regard to 22 | * product safety and inform Bosch Sensortec without delay of all security relevant incidents. 23 | * 24 | * Engineering Samples are marked with an asterisk (*) or (e). Samples may vary from the valid 25 | * technical specifications of the product series. They are therefore not intended or fit for resale to third 26 | * parties or for use in end products. Their sole purpose is internal client testing. The testing of an 27 | * engineering sample may in no way replace the testing of a product series. Bosch Sensortec 28 | * assumes no liability for the use of engineering samples. By accepting the engineering samples, the 29 | * Purchaser agrees to indemnify Bosch Sensortec from all claims arising from the use of engineering 30 | * samples. 31 | * 32 | * Special: 33 | * This software module (hereinafter called "Software") and any information on application-sheets 34 | * (hereinafter called "Information") is provided free of charge for the sole purpose to support your 35 | * application work. The Software and Information is subject to the following terms and conditions: 36 | * 37 | * The Software is specifically designed for the exclusive use for Bosch Sensortec products by 38 | * personnel who have special experience and training. Do not use this Software if you do not have the 39 | * proper experience or training. 40 | * 41 | * This Software package is provided `` as is `` and without any expressed or implied warranties, 42 | * including without limitation, the implied warranties of merchantability and fitness for a particular 43 | * purpose. 44 | * 45 | * Bosch Sensortec and their representatives and agents deny any liability for the functional impairment 46 | * of this Software in terms of fitness, performance and safety. Bosch Sensortec and their 47 | * representatives and agents shall not be liable for any direct or indirect damages or injury, except as 48 | * otherwise stipulated in mandatory applicable law. 49 | * 50 | * The Information provided is believed to be accurate and reliable. Bosch Sensortec assumes no 51 | * responsibility for the consequences of use of such Information nor for any infringement of patents or 52 | * other rights of third parties which may result from its use. No license is granted by implication or 53 | * otherwise under any patent or patent rights of Bosch. Specifications mentioned in the Information are 54 | * subject to change without notice. 55 | * 56 | * It is not allowed to deliver the source code of the Software to any third party without permission of 57 | * Bosch Sensortec. 58 | * 59 | */ 60 | /*! 61 | * 62 | * @file bsec_interface.h 63 | * 64 | * @brief 65 | * Contains the API for BSEC 66 | * 67 | */ 68 | 69 | 70 | #ifndef __BSEC_INTERFACE_H__ 71 | #define __BSEC_INTERFACE_H__ 72 | 73 | #include "bsec_datatypes.h" 74 | 75 | #ifdef __cplusplus 76 | extern "C" { 77 | #endif 78 | 79 | 80 | /*! @addtogroup bsec_interface BSEC C Interface 81 | * @brief Interfaces of BSEC signal processing library 82 | * 83 | * ### Interface usage 84 | * 85 | * The following provides a short overview on the typical operation sequence for BSEC. 86 | * 87 | * - Initialization of the library 88 | * 89 | * | Steps | Function | 90 | * |---------------------------------------------------------------------|--------------------------| 91 | * | Initialization of library | bsec_init() | 92 | * | Update configuration settings (optional) | bsec_set_configuration() | 93 | * | Restore the state of the library (optional) | bsec_set_state() | 94 | * 95 | * 96 | * - The following function is called to enable output signals and define their sampling rate / operation mode. 97 | * 98 | * | Steps | Function | 99 | * |---------------------------------------------|----------------------------| 100 | * | Enable library outputs with specified mode | bsec_update_subscription() | 101 | * 102 | * 103 | * - This table describes the main processing loop. 104 | * 105 | * | Steps | Function | 106 | * |-------------------------------------------|----------------------------------| 107 | * | Retrieve sensor settings to be used | bsec_sensor_control() | 108 | * | Configure sensor and trigger measurement | See BME680 API and example codes | 109 | * | Read results from sensor | See BME680 API and example codes | 110 | * | Perform signal processing | bsec_do_steps() | 111 | * 112 | * 113 | * - Before shutting down the system, the current state of BSEC can be retrieved and can then be used during 114 | * re-initalization to continue processing. 115 | * 116 | * | Steps | Function | 117 | * |----------------------------------------|-------------------| 118 | * | To retrieve the current library state | bsec_get_state() | 119 | * 120 | * 121 | * 122 | * ### Configuration and state 123 | * 124 | * Values of variables belonging to a BSEC instance are divided into two groups: 125 | * - Values **not updated by processing** of signals belong to the **configuration group**. If available, BSEC can be 126 | * configured before use with a customer specific configuration string. 127 | * - Values **updated during processing** are member of the **state group**. Saving and restoring of the state of BSEC 128 | * is necessary to maintain previously estimated sensor models and baseline information which is important for best 129 | * performance of the gas sensor outputs. 130 | * 131 | * @note BSEC library consists of adaptive algorithms which models the gas sensor which improves its performance over 132 | * the time. These will be lost if library is initialised due to system reset. In order to avoid this situation 133 | * library state shall be stored in non volatile memory so that it can be loaded after system reset. 134 | * 135 | * 136 | * @{ 137 | */ 138 | 139 | 140 | /*! 141 | * @brief Return the version information of BSEC library 142 | * 143 | * @param [out] bsec_version_p pointer to struct which is to be populated with the version information 144 | * 145 | * @return Zero if successful, otherwise an error code 146 | * 147 | * See also: bsec_version_t 148 | * 149 | \code{.c} 150 | // Example // 151 | bsec_version_t version; 152 | bsec_get_version(&version); 153 | printf("BSEC version: %d.%d.%d.%d",version.major, version.minor, version.major_bugfix, version.minor_bugfix); 154 | 155 | \endcode 156 | */ 157 | 158 | bsec_library_return_t bsec_get_version(bsec_version_t * bsec_version_p); 159 | 160 | 161 | /*! 162 | * @brief Initialize the library 163 | * 164 | * Initialization and reset of BSEC is performed by calling bsec_init(). Calling this function sets up the relation 165 | * among all internal modules, initializes run-time dependent library states and resets the configuration and state 166 | * of all BSEC signal processing modules to defaults. 167 | * 168 | * Before any further use, the library must be initialized. This ensure that all memory and states are in defined 169 | * conditions prior to processing any data. 170 | * 171 | * @return Zero if successful, otherwise an error code 172 | * 173 | \code{.c} 174 | 175 | // Initialize BSEC library before further use 176 | bsec_init(); 177 | 178 | \endcode 179 | */ 180 | 181 | bsec_library_return_t bsec_init(void); 182 | 183 | /*! 184 | * @brief Subscribe to library virtual sensors outputs 185 | * 186 | * Use bsec_update_subscription() to instruct BSEC which of the processed output signals are requested at which sample rates. 187 | * See ::bsec_virtual_sensor_t for available library outputs. 188 | * 189 | * Based on the requested virtual sensors outputs, BSEC will provide information about the required physical sensor input signals 190 | * (see ::bsec_physical_sensor_t) with corresponding sample rates. This information is purely informational as bsec_sensor_control() 191 | * will ensure the sensor is operated in the required manner. To disable a virtual sensor, set the sample rate to BSEC_SAMPLE_RATE_DISABLED. 192 | * 193 | * The subscription update using bsec_update_subscription() is apart from the signal processing one of the the most 194 | * important functions. It allows to enable the desired library outputs. The function determines which physical input 195 | * sensor signals are required at which sample rate to produce the virtual output sensor signals requested by the user. 196 | * When this function returns with success, the requested outputs are called subscribed. A very important feature is the 197 | * retaining of already subscribed outputs. Further outputs can be requested or disabled both individually and 198 | * group-wise in addition to already subscribed outputs without changing them unless a change of already subscribed 199 | * outputs is requested. 200 | * 201 | * @note The state of the library concerning the subscribed outputs cannot be retained among reboots. 202 | * 203 | * The interface of bsec_update_subscription() requires the usage of arrays of sensor configuration structures. 204 | * Such a structure has the fields sensor identifier and sample rate. These fields have the properties: 205 | * - Output signals of virtual sensors must be requested using unique identifiers (Member of ::bsec_virtual_sensor_t) 206 | * - Different sets of identifiers are available for inputs of physical sensors and outputs of virtual sensors 207 | * - Identifiers are unique values defined by the library, not from external 208 | * - Sample rates must be provided as value of 209 | * - An allowed sample rate for continuously sampled signals 210 | * - 65535.0f (BSEC_SAMPLE_RATE_DISABLED) to turn off outputs and identify disabled inputs 211 | * 212 | * @note The same sensor identifiers are also used within the functions bsec_do_steps(). 213 | * 214 | * The usage principles of bsec_update_subscription() are: 215 | * - Differential updates (i.e., only asking for outputs that the user would like to change) is supported. 216 | * - Invalid requests of outputs are ignored. Also if one of the requested outputs is unavailable, all the requests 217 | * are ignored. At the same time, a warning is returned. 218 | * - To disable BSEC, all outputs shall be turned off. Only enabled (subscribed) outputs have to be disabled while 219 | * already disabled outputs do not have to be disabled explicitly. 220 | * 221 | * @param[in] requested_virtual_sensors Pointer to array of requested virtual sensor (output) configurations for the library 222 | * @param[in] n_requested_virtual_sensors Number of virtual sensor structs pointed by requested_virtual_sensors 223 | * @param[out] required_sensor_settings Pointer to array of required physical sensor configurations for the library 224 | * @param[in,out] n_required_sensor_settings [in] Size of allocated required_sensor_settings array, [out] number of sensor configurations returned 225 | * 226 | * @return Zero when successful, otherwise an error code 227 | * 228 | * @sa bsec_sensor_configuration_t 229 | * @sa bsec_physical_sensor_t 230 | * @sa bsec_virtual_sensor_t 231 | * 232 | \code{.c} 233 | // Example // 234 | 235 | // Change 3 virtual sensors (switch IAQ and raw temperature -> on / pressure -> off) 236 | bsec_sensor_configuration_t requested_virtual_sensors[3]; 237 | uint8_t n_requested_virtual_sensors = 3; 238 | 239 | requested_virtual_sensors[0].sensor_id = BSEC_OUTPUT_IAQ_ESTIMATE; 240 | requested_virtual_sensors[0].sample_rate = BSEC_SAMPLE_RATE_ULP; 241 | requested_virtual_sensors[1].sensor_id = BSEC_OUTPUT_RAW_TEMPERATURE; 242 | requested_virtual_sensors[1].sample_rate = BSEC_SAMPLE_RATE_ULP; 243 | requested_virtual_sensors[2].sensor_id = BSEC_OUTPUT_RAW_PRESSURE; 244 | requested_virtual_sensors[2].sample_rate = BSEC_SAMPLE_RATE_DISABLED; 245 | 246 | // Allocate a struct for the returned phyisical sensor settings 247 | bsec_sensor_configuration_t required_sensor_settings[BSEC_MAX_PHYSICAL_SENSOR]; 248 | uint8_t n_required_sensor_settings = BSEC_MAX_PHYSICAL_SENSOR; 249 | 250 | // Call bsec_update_subscription() to enable/disable the requested virtual sensors 251 | bsec_update_subscription(requested_virtual_sensors, n_requested_virtual_sensors, required_sensor_settings, &n_required_sensor_settings); 252 | \endcode 253 | * 254 | */ 255 | bsec_library_return_t bsec_update_subscription(const bsec_sensor_configuration_t * const requested_virtual_sensors, 256 | const uint8_t n_requested_virtual_sensors, bsec_sensor_configuration_t * required_sensor_settings, 257 | uint8_t * n_required_sensor_settings); 258 | 259 | 260 | /*! 261 | * @brief Main signal processing function of BSEC 262 | * 263 | * 264 | * Processing of the input signals and returning of output samples is performed by bsec_do_steps(). 265 | * - The samples of all library inputs must be passed with unique identifiers representing the input signals from 266 | * physical sensors where the order of these inputs can be chosen arbitrary. However, all input have to be provided 267 | * within the same time period as they are read. A sequential provision to the library might result in undefined 268 | * behaviour. 269 | * - The samples of all library outputs are returned with unique identifiers corresponding to the output signals of 270 | * virtual sensors where the order of the returned outputs may be arbitrary. 271 | * - The samples of all input as well as output signals of physical as well as virtual sensors use the same 272 | * representation in memory with the following fields: 273 | * - Sensor identifier: 274 | * - For inputs: required to identify the input signal from a physical sensor 275 | * - For output: overwritten by bsec_do_steps() to identify the returned signal from a virtual sensor 276 | * - Time stamp of the sample 277 | * 278 | * Calling bsec_do_steps() requires the samples of the input signals to be provided along with their time stamp when 279 | * they are recorded and only when they are acquired. Repetition of samples with the same time stamp are ignored and 280 | * result in a warning. Repetition of values of samples which are not acquired anew by a sensor result in deviations 281 | * of the computed output signals. Concerning the returned output samples, an important feature is, that a value is 282 | * returned for an output only when a new occurrence has been computed. A sample of an output signal is returned only 283 | * once. 284 | * 285 | * 286 | * @param[in] inputs Array of input data samples. Each array element represents a sample of a different physical sensor. 287 | * @param[in] n_inputs Number of passed input data structs. 288 | * @param[out] outputs Array of output data samples. Each array element represents a sample of a different virtual sensor. 289 | * @param[in,out] n_outputs [in] Number of allocated output structs, [out] number of outputs returned 290 | * 291 | * @return Zero when successful, otherwise an error code 292 | * 293 | 294 | \code{.c} 295 | // Example // 296 | 297 | // Allocate input and output memory 298 | bsec_input_t input[3]; 299 | uint8_t n_input = 3; 300 | bsec_output_t output[2]; 301 | uint8_t n_output=2; 302 | 303 | bsec_library_return_t status; 304 | 305 | // Populate the input structs, assuming the we have timestamp (ts), 306 | // gas sensor resistance (R), temperature (T), and humidity (rH) available 307 | // as input variables 308 | input[0].sensor_id = BSEC_INPUT_GASRESISTOR; 309 | input[0].signal = R; 310 | input[0].time_stamp= ts; 311 | input[1].sensor_id = BSEC_INPUT_TEMPERATURE; 312 | input[1].signal = T; 313 | input[1].time_stamp= ts; 314 | input[2].sensor_id = BSEC_INPUT_HUMIDITY; 315 | input[2].signal = rH; 316 | input[2].time_stamp= ts; 317 | 318 | 319 | // Invoke main processing BSEC function 320 | status = bsec_do_steps( input, n_input, output, &n_output ); 321 | 322 | // Iterature through the BSEC output data, if the call succeeded 323 | if(status == BSEC_OK) 324 | { 325 | for(int i = 0; i < n_output; i++) 326 | { 327 | switch(output[i].sensor_id) 328 | { 329 | case BSEC_OUTPUT_IAQ_ESTIMATE: 330 | // Retrieve the IAQ results from output[i].signal 331 | // and do something with the data 332 | break; 333 | case BSEC_OUTPUT_AMBIENT_TEMPERATURE: 334 | // Retrieve the ambient temperature results from output[i].signal 335 | // and do something with the data 336 | break; 337 | 338 | } 339 | } 340 | } 341 | 342 | \endcode 343 | */ 344 | 345 | bsec_library_return_t bsec_do_steps(const bsec_input_t * const inputs, const uint8_t n_inputs, bsec_output_t * outputs, uint8_t * n_outputs); 346 | 347 | 348 | /*! 349 | * @brief Reset a particular virtual sensor output 350 | * 351 | * This function allows specific virtual sensor outputs to be reset. The meaning of "reset" depends on the specific 352 | * output. In case of the IAQ output, reset means zeroing the output to the current ambient conditions. 353 | * 354 | * @param[in] sensor_id Virtual sensor to be reset 355 | * 356 | * @return Zero when successful, otherwise an error code 357 | * 358 | * 359 | \code{.c} 360 | // Example // 361 | bsec_reset_output(BSEC_OUTPUT_IAQ_ESTIMATE); 362 | 363 | \endcode 364 | */ 365 | 366 | bsec_library_return_t bsec_reset_output(uint8_t sensor_id); 367 | 368 | /*! 369 | * @brief Retrieve the current library configuration 370 | * 371 | * BSEC allows to retrieve the current configuration using bsec_get_configuration(). Returns a binary blob encoding 372 | * the current configuration parameters of the library in a format compatible with bsec_set_configuration(). 373 | * 374 | * @note The function bsec_get_configuration() is required to be used for debugging purposes only. 375 | * @note A work buffer with sufficient size is required and has to be provided by the function caller to decompose the 376 | * serialization and apply it to the library and its modules. Please use #BSEC_MAX_PROPERTY_BLOB_SIZE for allotting the 377 | * required size. 378 | * 379 | * 380 | * @param[in] config_id Identifier for a specific set of configuration settings to be returned; 381 | * shall be zero to retrieve all configuration settings. 382 | * @param[out] serialized_settings Buffer to hold the serialized config blob 383 | * @param[in] n_serialized_settings_max Maximum available size for the serialized settings 384 | * @param[in,out] work_buffer Work buffer used to parse the binary blob 385 | * @param[in] n_work_buffer Length of the work buffer available for parsing the blob 386 | * @param[out] n_serialized_settings Actual size of the returned serialized configuration blob 387 | * 388 | * @return Zero when successful, otherwise an error code 389 | * 390 | \code{.c} 391 | // Example // 392 | 393 | // Allocate variables 394 | uint8_t serialized_settings[BSEC_MAX_PROPERTY_BLOB_SIZE]; 395 | uint32_t n_serialized_settings_max = BSEC_MAX_PROPERTY_BLOB_SIZE; 396 | uint8_t work_buffer[BSEC_MAX_PROPERTY_BLOB_SIZE]; 397 | uint32_t n_work_buffer = BSEC_MAX_PROPERTY_BLOB_SIZE; 398 | uint32_t n_serialized_settings = 0; 399 | 400 | // Configuration of BSEC algorithm is stored in 'serialized_settings' 401 | bsec_get_configuration(0, serialized_settings, n_serialized_settings_max, work_buffer, n_work_buffer, &n_serialized_settings); 402 | 403 | \endcode 404 | */ 405 | 406 | bsec_library_return_t bsec_get_configuration(const uint8_t config_id, uint8_t * serialized_settings, const uint32_t n_serialized_settings_max, 407 | uint8_t * work_buffer, const uint32_t n_work_buffer, uint32_t * n_serialized_settings); 408 | 409 | 410 | /*! 411 | * @brief Retrieve BMExxx sensor instructions 412 | * 413 | * The bsec_sensor_control() interface is a key feature of BSEC, as it allows an easy way for the signal processing 414 | * library to control the operation of the BME sensor. This is important since gas sensor behaviour is mainly 415 | * determined by how the integrated heater is configured. To ensure an easy integration of BSEC into any system, 416 | * bsec_sensor_control() will provide the caller with information about the current sensor configuration that is 417 | * necessary to fulfill the input requirements derived from the current outputs requested via 418 | * bsec_update_subscription(). 419 | * 420 | * In practice the use of this function shall be as follows: 421 | * - Call bsec_sensor_control() which returns a bsec_bme_settings_t struct. 422 | * - Based on the information contained in this struct, the sensor is configured and a forced-mode measurement is 423 | * triggered if requested by bsec_sensor_control(). 424 | * - Once this forced-mode measurement is complete, the signals specified in this struct shall be passed to 425 | * bsec_do_steps() to perform the signal processing. 426 | * - After processing, the process should sleep until the bsec_bme_settings_t::next_call timestamp is reached. 427 | * 428 | * 429 | * @param [in] time_stamp Current timestamp in [ns] 430 | * @param[out] sensor_settings Settings to be passed to API to operate sensor at this time instance 431 | * 432 | * @return Zero when successful, otherwise an error code 433 | */ 434 | 435 | bsec_library_return_t bsec_sensor_control(const int64_t time_stamp, bsec_bme_settings_t *sensor_settings); 436 | 437 | /*@}*/ //BSEC Interface 438 | 439 | #ifdef __cplusplus 440 | } 441 | #endif 442 | 443 | #endif /* __BSEC_INTERFACE_H__ */ 444 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/arm32/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/arm32/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/arm32/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 13070 0 984 14054 36e6 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/arm64/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/arm64/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/arm64/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 19804 0 984 20788 5134 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/x86_32/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/x86_32/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/x86_32/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 26646 0 956 27602 6bd2 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/x86_64/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/x86_64/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/android/x86_64/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 22129 0 984 23113 5a49 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M0+/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M0+/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M0+/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12651 0 984 13635 3543 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M0/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M0/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M0/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12651 0 984 13635 3543 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M3/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M3/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M3/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12129 0 984 13113 3339 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M4/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M4/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M4/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12129 0 984 13113 3339 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M4F/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M4F/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M4F/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 13121 0 984 14105 3719 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M7/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M7/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/armcc/Cortex_M7/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12147 0 984 13131 334b (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/avr/AVR32/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/avr/AVR32/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/avr/AVR32/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 13970 0 1216 15186 3b52 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/avr/AVR8_XMEGA/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/avr/AVR8_XMEGA/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/avr/AVR8_XMEGA/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 26545 0 917 27462 6b46 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/avr/AVR8_megaAVR/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/avr/AVR8_megaAVR/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/avr/AVR8_megaAVR/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 26755 0 917 27672 6c18 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/esp32/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/esp32/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/esp32/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 14683 0 984 15667 3d33 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/esp8266/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/esp8266/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/esp8266/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 17649 0 984 18633 48c9 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_A7/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_A7/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_A7/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 13055 0 984 14039 36d7 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M0+/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M0+/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M0+/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 13983 0 984 14967 3a77 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M0/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M0/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M0/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 13983 0 984 14967 3a77 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M3/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M3/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M3/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12591 0 984 13575 3507 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M4/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M4/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M4/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12579 0 984 13563 34fb (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M4F/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M4F/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M4F/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12735 0 984 13719 3597 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M7/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M7/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/gcc/Cortex_M7/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 12559 0 984 13543 34e7 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/msp430_elf_gcc/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/msp430_elf_gcc/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Lite_version/msp430_elf_gcc/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 22675 0 936 23611 5c3b (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/IAR_compiling_options.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/IAR_compiling_options.docx -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m0+/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m0+/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m0+/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 20462 0 1000 21462 53d6 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m0/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m0/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m0/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 20462 0 1000 21462 53d6 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m3/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m3/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m3/libalgobsec.a.size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 19752 0 1000 20752 5110 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m4/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m4/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m4/libalgobsec.a.size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 19760 0 1000 20760 5118 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m4f/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m4f/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m4f/libalgobsec.a.size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 20430 0 1000 21430 53b6 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m7/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m7/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/IAR/cortex_m7/libalgobsec.a.size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 19780 0 1000 20780 512c (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/RaspberryPI/PiThree_ArmV8-a-64bits/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/RaspberryPI/PiThree_ArmV8-a-64bits/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/RaspberryPI/PiThree_ArmV8-a-64bits/libalgobsec.a.size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 73836 0 1008 74844 1245c (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/RaspberryPI/PiZero_ArmV6-32bits/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/RaspberryPI/PiZero_ArmV6-32bits/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/RaspberryPI/PiZero_ArmV6-32bits/libalgobsec.a.size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 73192 0 1008 74200 121d8 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/arm32/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/arm32/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/arm32/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 21110 0 1008 22118 5666 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/arm64/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/arm64/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/arm64/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 36160 0 1008 37168 9130 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/x86_32/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/x86_32/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/x86_32/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 47124 0 980 48104 bbe8 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/x86_64/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/x86_64/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/android/x86_64/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 38637 0 1008 39645 9add (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M0+/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M0+/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M0+/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 19689 0 1000 20689 50d1 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M0/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M0/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M0/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 19689 0 1000 20689 50d1 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M3/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M3/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M3/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 18961 0 1000 19961 4df9 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M4/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M4/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M4/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 18961 0 1000 19961 4df9 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M4F/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M4F/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M4F/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 20071 0 1000 21071 524f (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M7/libalgobsec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M7/libalgobsec.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/armcc/Cortex_M7/libalgobsec.lib.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 18979 0 1000 19979 4e0b (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/avr/AVR32/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/avr/AVR32/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/avr/AVR32/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 24056 0 1240 25296 62d0 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/avr/AVR8_XMEGA/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/avr/AVR8_XMEGA/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/avr/AVR8_XMEGA/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 42123 0 929 43052 a82c (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/avr/AVR8_megaAVR/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/avr/AVR8_megaAVR/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/avr/AVR8_megaAVR/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 42833 0 929 43762 aaf2 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x64/BSECLibrary64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x64/BSECLibrary64.dll -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x64/BSECLibrary64.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x64/BSECLibrary64.exp -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x64/BSECLibrary64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x64/BSECLibrary64.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x64/bseclibrary64.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x64/bseclibrary64.pdb -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x86/BSECLibrary32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x86/BSECLibrary32.dll -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x86/BSECLibrary32.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x86/BSECLibrary32.exp -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x86/BSECLibrary32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x86/BSECLibrary32.lib -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x86/bseclibrary32.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/dll/x86/bseclibrary32.pdb -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/esp32/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/esp32/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/esp32/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 23931 0 1008 24939 616b (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/esp8266/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/esp8266/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/esp8266/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 28227 0 1008 29235 7233 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_A7/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_A7/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_A7/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 21207 0 1000 22207 56bf (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M0+/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M0+/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M0+/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 22631 0 1000 23631 5c4f (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M0/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M0/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M0/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 22631 0 1000 23631 5c4f (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M3/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M3/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M3/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 20631 0 1000 21631 547f (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M4/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M4/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M4/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 20623 0 1000 21623 5477 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M4F/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M4F/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M4F/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 20879 0 1000 21879 5577 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M7/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M7/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/gcc/Cortex_M7/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 20731 0 1000 21731 54e3 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/msp430_elf_gcc/libalgobsec.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/msp430_elf_gcc/libalgobsec.a -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/algo/bin/Normal_version/msp430_elf_gcc/libalgobsec.a.Size.log: -------------------------------------------------------------------------------- 1 | text data bss dec hex filename 2 | 35301 0 948 36249 8d99 (TOTALS) 3 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_28d/bsec_iaq.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_28d/bsec_iaq.config -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_28d/bsec_iaq.csv: -------------------------------------------------------------------------------- 1 | 304,0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,168,19,73,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,0,0,64,63,0,0,128,62,1,1,0,0,128,63,6,205,204,76,61,0,0,0,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,117,0,0,0,0,44,47,0,0 2 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_28d/bsec_serialized_configurations_iaq.c: -------------------------------------------------------------------------------- 1 | #include "bsec_serialized_configurations_iaq.h" 2 | 3 | const uint8_t bsec_config_iaq[304] = 4 | {0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,168,19,73,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,0,0,64,63,0,0,128,62,1,1,0,0,128,63,6,205,204,76,61,0,0,0,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,117,0,0,0,0,44,47,0,0}; 5 | 6 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_28d/bsec_serialized_configurations_iaq.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const uint8_t bsec_config_iaq[304]; 4 | 5 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_4d/bsec_iaq.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_4d/bsec_iaq.config -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_4d/bsec_iaq.csv: -------------------------------------------------------------------------------- 1 | 304,0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,192,168,71,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,0,0,64,63,0,0,128,62,1,1,0,0,128,63,6,205,204,76,61,0,0,0,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,117,0,0,0,0,179,100,0,0 2 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_4d/bsec_serialized_configurations_iaq.c: -------------------------------------------------------------------------------- 1 | #include "bsec_serialized_configurations_iaq.h" 2 | 3 | const uint8_t bsec_config_iaq[304] = 4 | {0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,192,168,71,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,0,0,64,63,0,0,128,62,1,1,0,0,128,63,6,205,204,76,61,0,0,0,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,117,0,0,0,0,179,100,0,0}; 5 | 6 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_300s_4d/bsec_serialized_configurations_iaq.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const uint8_t bsec_config_iaq[304]; 4 | 5 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_28d/bsec_iaq.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_28d/bsec_iaq.config -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_28d/bsec_iaq.csv: -------------------------------------------------------------------------------- 1 | 304,0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,168,19,73,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,0,0,64,63,0,0,128,62,1,1,0,0,128,63,6,205,204,76,61,0,0,0,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,44,1,0,0,0,0,190,38,0,0 2 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_28d/bsec_serialized_configurations_iaq.c: -------------------------------------------------------------------------------- 1 | #include "bsec_serialized_configurations_iaq.h" 2 | 3 | const uint8_t bsec_config_iaq[304] = 4 | {0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,168,19,73,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,0,0,64,63,0,0,128,62,1,1,0,0,128,63,6,205,204,76,61,0,0,0,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,44,1,0,0,0,0,190,38,0,0}; 5 | 6 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_28d/bsec_serialized_configurations_iaq.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const uint8_t bsec_config_iaq[304]; 4 | 5 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_4d/bsec_iaq.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_4d/bsec_iaq.config -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_4d/bsec_iaq.csv: -------------------------------------------------------------------------------- 1 | 304,0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,192,168,71,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,0,0,64,63,0,0,128,62,1,1,0,0,128,63,6,205,204,76,61,0,0,0,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,44,1,0,0,0,0,33,109,0,0 2 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_4d/bsec_serialized_configurations_iaq.c: -------------------------------------------------------------------------------- 1 | #include "bsec_serialized_configurations_iaq.h" 2 | 3 | const uint8_t bsec_config_iaq[304] = 4 | {0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,192,168,71,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,0,0,64,63,0,0,128,62,1,1,0,0,128,63,6,205,204,76,61,0,0,0,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,44,1,0,0,0,0,33,109,0,0}; 5 | 6 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_18v_3s_4d/bsec_serialized_configurations_iaq.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const uint8_t bsec_config_iaq[304]; 4 | 5 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_28d/bsec_iaq.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_28d/bsec_iaq.config -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_28d/bsec_iaq.csv: -------------------------------------------------------------------------------- 1 | 304,0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,168,19,73,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,154,153,89,63,154,153,25,62,1,1,0,0,128,63,6,236,81,184,61,51,51,131,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,117,0,0,0,0,111,215,0,0 2 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_28d/bsec_serialized_configurations_iaq.c: -------------------------------------------------------------------------------- 1 | #include "bsec_serialized_configurations_iaq.h" 2 | 3 | const uint8_t bsec_config_iaq[304] = 4 | {0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,168,19,73,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,154,153,89,63,154,153,25,62,1,1,0,0,128,63,6,236,81,184,61,51,51,131,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,117,0,0,0,0,111,215,0,0}; 5 | 6 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_28d/bsec_serialized_configurations_iaq.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const uint8_t bsec_config_iaq[304]; 4 | 5 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_4d/bsec_iaq.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_4d/bsec_iaq.config -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_4d/bsec_iaq.csv: -------------------------------------------------------------------------------- 1 | 304,0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,192,168,71,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,154,153,89,63,154,153,25,62,1,1,0,0,128,63,6,236,81,184,61,51,51,131,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,117,0,0,0,0,240,156,0,0 2 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_4d/bsec_serialized_configurations_iaq.c: -------------------------------------------------------------------------------- 1 | #include "bsec_serialized_configurations_iaq.h" 2 | 3 | const uint8_t bsec_config_iaq[304] = 4 | {0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,192,168,71,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,154,153,89,63,154,153,25,62,1,1,0,0,128,63,6,236,81,184,61,51,51,131,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,117,0,0,0,0,240,156,0,0}; 5 | 6 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_300s_4d/bsec_serialized_configurations_iaq.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const uint8_t bsec_config_iaq[304]; 4 | 5 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_28d/bsec_iaq.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_28d/bsec_iaq.config -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_28d/bsec_iaq.csv: -------------------------------------------------------------------------------- 1 | 304,0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,168,19,73,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,154,153,89,63,154,153,25,62,1,1,0,0,128,63,6,236,81,184,61,51,51,131,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,44,1,0,0,0,0,253,222,0,0 2 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_28d/bsec_serialized_configurations_iaq.c: -------------------------------------------------------------------------------- 1 | #include "bsec_serialized_configurations_iaq.h" 2 | 3 | const uint8_t bsec_config_iaq[304] = 4 | {0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,168,19,73,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,154,153,89,63,154,153,25,62,1,1,0,0,128,63,6,236,81,184,61,51,51,131,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,44,1,0,0,0,0,253,222,0,0}; 5 | 6 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_28d/bsec_serialized_configurations_iaq.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const uint8_t bsec_config_iaq[304]; 4 | 5 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_4d/bsec_iaq.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_4d/bsec_iaq.config -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_4d/bsec_iaq.csv: -------------------------------------------------------------------------------- 1 | 304,0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,192,168,71,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,154,153,89,63,154,153,25,62,1,1,0,0,128,63,6,236,81,184,61,51,51,131,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,44,1,0,0,0,0,98,149,0,0 2 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_4d/bsec_serialized_configurations_iaq.c: -------------------------------------------------------------------------------- 1 | #include "bsec_serialized_configurations_iaq.h" 2 | 3 | const uint8_t bsec_config_iaq[304] = 4 | {0,6,4,1,61,0,0,0,0,0,0,0,24,1,0,0,40,0,1,0,137,65,0,63,0,0,64,63,205,204,76,62,0,0,225,68,0,192,168,71,0,0,0,0,0,80,10,90,0,0,0,0,0,0,0,0,21,0,2,0,0,244,1,225,0,25,10,144,1,0,0,112,65,0,0,0,63,16,0,3,0,10,215,163,60,10,215,35,59,10,215,35,59,9,0,5,0,0,0,0,0,1,51,0,9,0,10,215,163,59,205,204,204,61,225,122,148,62,41,92,15,61,0,0,0,63,0,0,0,63,154,153,89,63,154,153,25,62,1,1,0,0,128,63,6,236,81,184,61,51,51,131,64,12,0,10,0,0,0,0,0,0,0,0,0,131,0,254,0,2,1,5,48,117,100,0,44,1,151,7,132,3,197,0,144,1,64,1,64,1,48,117,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,48,117,100,0,100,0,100,0,100,0,48,117,48,117,48,117,100,0,100,0,100,0,48,117,48,117,100,0,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,44,1,0,0,0,0,98,149,0,0}; 5 | 6 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/config/generic_33v_3s_4d/bsec_serialized_configurations_iaq.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const uint8_t bsec_config_iaq[304]; 4 | 5 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/doc/BSEC_Binary_Size_Information.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/doc/BSEC_Binary_Size_Information.pdf -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/doc/BST-BME680-AN008-46.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstoermer/bsec_bme680_python/cf60d03846f80f990cd66b20a2bebd88b2fb2241/src/BSEC_1.4.6.0_Generic_Release_20180425/doc/BST-BME680-AN008-46.pdf -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/example/bsec_integration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Robert Bosch. All Rights Reserved. 3 | * 4 | * Disclaimer 5 | * 6 | * Common: 7 | * Bosch Sensortec products are developed for the consumer goods industry. They may only be used 8 | * within the parameters of the respective valid product data sheet. Bosch Sensortec products are 9 | * provided with the express understanding that there is no warranty of fitness for a particular purpose. 10 | * They are not fit for use in life-sustaining, safety or security sensitive systems or any system or device 11 | * that may lead to bodily harm or property damage if the system or device malfunctions. In addition, 12 | * Bosch Sensortec products are not fit for use in products which interact with motor vehicle systems. 13 | * The resale and/or use of products are at the purchasers own risk and his own responsibility. The 14 | * examination of fitness for the intended use is the sole responsibility of the Purchaser. 15 | * 16 | * The purchaser shall indemnify Bosch Sensortec from all third party claims, including any claims for 17 | * incidental, or consequential damages, arising from any product use not covered by the parameters of 18 | * the respective valid product data sheet or not approved by Bosch Sensortec and reimburse Bosch 19 | * Sensortec for all costs in connection with such claims. 20 | * 21 | * The purchaser must monitor the market for the purchased products, particularly with regard to 22 | * product safety and inform Bosch Sensortec without delay of all security relevant incidents. 23 | * 24 | * Engineering Samples are marked with an asterisk (*) or (e). Samples may vary from the valid 25 | * technical specifications of the product series. They are therefore not intended or fit for resale to third 26 | * parties or for use in end products. Their sole purpose is internal client testing. The testing of an 27 | * engineering sample may in no way replace the testing of a product series. Bosch Sensortec 28 | * assumes no liability for the use of engineering samples. By accepting the engineering samples, the 29 | * Purchaser agrees to indemnify Bosch Sensortec from all claims arising from the use of engineering 30 | * samples. 31 | * 32 | * Special: 33 | * This software module (hereinafter called "Software") and any information on application-sheets 34 | * (hereinafter called "Information") is provided free of charge for the sole purpose to support your 35 | * application work. The Software and Information is subject to the following terms and conditions: 36 | * 37 | * The Software is specifically designed for the exclusive use for Bosch Sensortec products by 38 | * personnel who have special experience and training. Do not use this Software if you do not have the 39 | * proper experience or training. 40 | * 41 | * This Software package is provided `` as is `` and without any expressed or implied warranties, 42 | * including without limitation, the implied warranties of merchantability and fitness for a particular 43 | * purpose. 44 | * 45 | * Bosch Sensortec and their representatives and agents deny any liability for the functional impairment 46 | * of this Software in terms of fitness, performance and safety. Bosch Sensortec and their 47 | * representatives and agents shall not be liable for any direct or indirect damages or injury, except as 48 | * otherwise stipulated in mandatory applicable law. 49 | * 50 | * The Information provided is believed to be accurate and reliable. Bosch Sensortec assumes no 51 | * responsibility for the consequences of use of such Information nor for any infringement of patents or 52 | * other rights of third parties which may result from its use. No license is granted by implication or 53 | * otherwise under any patent or patent rights of Bosch. Specifications mentioned in the Information are 54 | * subject to change without notice. 55 | * 56 | * It is not allowed to deliver the source code of the Software to any third party without permission of 57 | * Bosch Sensortec. 58 | * 59 | */ 60 | 61 | /*! 62 | * @file bsec_integration.h 63 | * 64 | * @brief 65 | * Contains BSEC integration API 66 | */ 67 | 68 | /*! 69 | * @addtogroup bsec_examples BSEC Examples 70 | * @brief BSEC usage examples 71 | * @{*/ 72 | 73 | #ifndef __BSEC_INTEGRATION_H__ 74 | #define __BSEC_INTEGRATION_H__ 75 | 76 | #ifdef __cplusplus 77 | extern "C" 78 | { 79 | #endif 80 | 81 | /**********************************************************************************************************************/ 82 | /* header files */ 83 | /**********************************************************************************************************************/ 84 | 85 | /* Use the following bme680 driver: https://github.com/BoschSensortec/BME680_driver/releases/tag/bme680_v3.5.1 */ 86 | #include "bme680.h" 87 | /* BSEC header files are available in the inc/ folder of the release package */ 88 | #include "bsec_interface.h" 89 | #include "bsec_datatypes.h" 90 | 91 | 92 | /**********************************************************************************************************************/ 93 | /* type definitions */ 94 | /**********************************************************************************************************************/ 95 | 96 | /* function pointer to the system specific sleep function */ 97 | typedef void (*sleep_fct)(uint32_t t_ms); 98 | 99 | /* function pointer to the system specific timestamp derivation function */ 100 | typedef int64_t (*get_timestamp_us_fct)(); 101 | 102 | /* function pointer to the function processing obtained BSEC outputs */ 103 | typedef void (*output_ready_fct)(int64_t timestamp, float iaq, uint8_t iaq_accuracy, float temperature, float humidity, 104 | float pressure, float raw_temperature, float raw_humidity, float gas, bsec_library_return_t bsec_status); 105 | 106 | /* function pointer to the function loading a previous BSEC state from NVM */ 107 | typedef uint32_t (*state_load_fct)(uint8_t *state_buffer, uint32_t n_buffer); 108 | 109 | /* function pointer to the function saving BSEC state to NVM */ 110 | typedef void (*state_save_fct)(const uint8_t *state_buffer, uint32_t length); 111 | 112 | /* function pointer to the function loading the BSEC configuration string from NVM */ 113 | typedef uint32_t (*config_load_fct)(uint8_t *state_buffer, uint32_t n_buffer); 114 | 115 | /* structure definitions */ 116 | 117 | /* Structure with the return value from bsec_iot_init() */ 118 | typedef struct{ 119 | /*! Result of API execution status */ 120 | int8_t bme680_status; 121 | /*! Result of BSEC library */ 122 | bsec_library_return_t bsec_status; 123 | }return_values_init; 124 | /**********************************************************************************************************************/ 125 | /* function declarations */ 126 | /**********************************************************************************************************************/ 127 | 128 | /*! 129 | * @brief Initialize the BME680 sensor and the BSEC library 130 | * 131 | * @param[in] sample_rate mode to be used (either BSEC_SAMPLE_RATE_ULP or BSEC_SAMPLE_RATE_LP) 132 | * @param[in] temperature_offset device-specific temperature offset (due to self-heating) 133 | * @param[in] bus_write pointer to the bus writing function 134 | * @param[in] bus_read pointer to the bus reading function 135 | * @param[in] sleep pointer to the system-specific sleep function 136 | * @param[in] state_load pointer to the system-specific state load function 137 | * 138 | * @return zero if successful, negative otherwise 139 | */ 140 | return_values_init bsec_iot_init(float sample_rate, float temperature_offset, bme680_com_fptr_t bus_write, bme680_com_fptr_t bus_read, 141 | sleep_fct sleep, state_load_fct state_load, config_load_fct config_load); 142 | 143 | /*! 144 | * @brief Runs the main (endless) loop that queries sensor settings, applies them, and processes the measured data 145 | * 146 | * @param[in] sleep pointer to the system-specific sleep function 147 | * @param[in] get_timestamp_us pointer to the system-specific timestamp derivation function 148 | * @param[in] output_ready pointer to the function processing obtained BSEC outputs 149 | * @param[in] state_save pointer to the system-specific state save function 150 | * @param[in] save_intvl interval at which BSEC state should be saved (in samples) 151 | * 152 | * @return return_values_init struct with the result of the API and the BSEC library 153 | */ 154 | void bsec_iot_loop(sleep_fct sleep, get_timestamp_us_fct get_timestamp_us, output_ready_fct output_ready, 155 | state_save_fct state_save, uint32_t save_intvl); 156 | 157 | #ifdef __cplusplus 158 | } 159 | #endif 160 | 161 | #endif /* __BSEC_INTEGRATION_H__ */ 162 | 163 | /*! @}*/ 164 | 165 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/example/bsec_iot_example.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Robert Bosch. All Rights Reserved. 3 | * 4 | * Disclaimer 5 | * 6 | * Common: 7 | * Bosch Sensortec products are developed for the consumer goods industry. They may only be used 8 | * within the parameters of the respective valid product data sheet. Bosch Sensortec products are 9 | * provided with the express understanding that there is no warranty of fitness for a particular purpose. 10 | * They are not fit for use in life-sustaining, safety or security sensitive systems or any system or device 11 | * that may lead to bodily harm or property damage if the system or device malfunctions. In addition, 12 | * Bosch Sensortec products are not fit for use in products which interact with motor vehicle systems. 13 | * The resale and/or use of products are at the purchasers own risk and his own responsibility. The 14 | * examination of fitness for the intended use is the sole responsibility of the Purchaser. 15 | * 16 | * The purchaser shall indemnify Bosch Sensortec from all third party claims, including any claims for 17 | * incidental, or consequential damages, arising from any product use not covered by the parameters of 18 | * the respective valid product data sheet or not approved by Bosch Sensortec and reimburse Bosch 19 | * Sensortec for all costs in connection with such claims. 20 | * 21 | * The purchaser must monitor the market for the purchased products, particularly with regard to 22 | * product safety and inform Bosch Sensortec without delay of all security relevant incidents. 23 | * 24 | * Engineering Samples are marked with an asterisk (*) or (e). Samples may vary from the valid 25 | * technical specifications of the product series. They are therefore not intended or fit for resale to third 26 | * parties or for use in end products. Their sole purpose is internal client testing. The testing of an 27 | * engineering sample may in no way replace the testing of a product series. Bosch Sensortec 28 | * assumes no liability for the use of engineering samples. By accepting the engineering samples, the 29 | * Purchaser agrees to indemnify Bosch Sensortec from all claims arising from the use of engineering 30 | * samples. 31 | * 32 | * Special: 33 | * This software module (hereinafter called "Software") and any information on application-sheets 34 | * (hereinafter called "Information") is provided free of charge for the sole purpose to support your 35 | * application work. The Software and Information is subject to the following terms and conditions: 36 | * 37 | * The Software is specifically designed for the exclusive use for Bosch Sensortec products by 38 | * personnel who have special experience and training. Do not use this Software if you do not have the 39 | * proper experience or training. 40 | * 41 | * This Software package is provided `` as is `` and without any expressed or implied warranties, 42 | * including without limitation, the implied warranties of merchantability and fitness for a particular 43 | * purpose. 44 | * 45 | * Bosch Sensortec and their representatives and agents deny any liability for the functional impairment 46 | * of this Software in terms of fitness, performance and safety. Bosch Sensortec and their 47 | * representatives and agents shall not be liable for any direct or indirect damages or injury, except as 48 | * otherwise stipulated in mandatory applicable law. 49 | * 50 | * The Information provided is believed to be accurate and reliable. Bosch Sensortec assumes no 51 | * responsibility for the consequences of use of such Information nor for any infringement of patents or 52 | * other rights of third parties which may result from its use. No license is granted by implication or 53 | * otherwise under any patent or patent rights of Bosch. Specifications mentioned in the Information are 54 | * subject to change without notice. 55 | * 56 | * It is not allowed to deliver the source code of the Software to any third party without permission of 57 | * Bosch Sensortec. 58 | * 59 | */ 60 | 61 | /*! 62 | * @file bsec_iot_example.c 63 | * 64 | * @brief 65 | * Example for using of BSEC library in a fixed configuration with the BME680 sensor. 66 | * This works by running an endless loop in the bsec_iot_loop() function. 67 | */ 68 | 69 | /*! 70 | * @addtogroup bsec_examples BSEC Examples 71 | * @brief BSEC usage examples 72 | * @{*/ 73 | 74 | /**********************************************************************************************************************/ 75 | /* header files */ 76 | /**********************************************************************************************************************/ 77 | 78 | #include "bsec_integration.h" 79 | 80 | /**********************************************************************************************************************/ 81 | /* functions */ 82 | /**********************************************************************************************************************/ 83 | 84 | /*! 85 | * @brief Write operation in either I2C or SPI 86 | * 87 | * param[in] dev_addr I2C or SPI device address 88 | * param[in] reg_addr register address 89 | * param[in] reg_data_ptr pointer to the data to be written 90 | * param[in] data_len number of bytes to be written 91 | * 92 | * @return result of the bus communication function 93 | */ 94 | int8_t bus_write(uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data_ptr, uint16_t data_len) 95 | { 96 | // ... 97 | // Please insert system specific function to write to the bus where BME680 is connected 98 | // ... 99 | return 0; 100 | } 101 | 102 | /*! 103 | * @brief Read operation in either I2C or SPI 104 | * 105 | * param[in] dev_addr I2C or SPI device address 106 | * param[in] reg_addr register address 107 | * param[out] reg_data_ptr pointer to the memory to be used to store the read data 108 | * param[in] data_len number of bytes to be read 109 | * 110 | * @return result of the bus communication function 111 | */ 112 | int8_t bus_read(uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data_ptr, uint16_t data_len) 113 | { 114 | // ... 115 | // Please insert system specific function to read from bus where BME680 is connected 116 | // ... 117 | return 0; 118 | } 119 | 120 | /*! 121 | * @brief System specific implementation of sleep function 122 | * 123 | * @param[in] t_ms time in milliseconds 124 | * 125 | * @return none 126 | */ 127 | void sleep(uint32_t t_ms) 128 | { 129 | // ... 130 | // Please insert system specific function sleep or delay for t_ms milliseconds 131 | // ... 132 | } 133 | 134 | /*! 135 | * @brief Capture the system time in microseconds 136 | * 137 | * @return system_current_time current system timestamp in microseconds 138 | */ 139 | int64_t get_timestamp_us() 140 | { 141 | int64_t system_current_time = 0; 142 | // ... 143 | // Please insert system specific function to retrieve a timestamp (in microseconds) 144 | // ... 145 | return system_current_time; 146 | } 147 | 148 | /*! 149 | * @brief Handling of the ready outputs 150 | * 151 | * @param[in] timestamp time in nanoseconds 152 | * @param[in] iaq IAQ signal 153 | * @param[in] iaq_accuracy accuracy of IAQ signal 154 | * @param[in] temperature temperature signal 155 | * @param[in] humidity humidity signal 156 | * @param[in] pressure pressure signal 157 | * @param[in] raw_temperature raw temperature signal 158 | * @param[in] raw_humidity raw humidity signal 159 | * @param[in] gas raw gas sensor signal 160 | * @param[in] bsec_status value returned by the bsec_do_steps() call 161 | * 162 | * @return none 163 | */ 164 | void output_ready(int64_t timestamp, float iaq, uint8_t iaq_accuracy, float temperature, float humidity, 165 | float pressure, float raw_temperature, float raw_humidity, float gas, bsec_library_return_t bsec_status) 166 | { 167 | // ... 168 | // Please insert system specific code to further process or display the BSEC outputs 169 | // ... 170 | } 171 | 172 | /*! 173 | * @brief Load previous library state from non-volatile memory 174 | * 175 | * @param[in,out] state_buffer buffer to hold the loaded state string 176 | * @param[in] n_buffer size of the allocated state buffer 177 | * 178 | * @return number of bytes copied to state_buffer 179 | */ 180 | uint32_t state_load(uint8_t *state_buffer, uint32_t n_buffer) 181 | { 182 | // ... 183 | // Load a previous library state from non-volatile memory, if available. 184 | // 185 | // Return zero if loading was unsuccessful or no state was available, 186 | // otherwise return length of loaded state string. 187 | // ... 188 | return 0; 189 | } 190 | 191 | /*! 192 | * @brief Save library state to non-volatile memory 193 | * 194 | * @param[in] state_buffer buffer holding the state to be stored 195 | * @param[in] length length of the state string to be stored 196 | * 197 | * @return none 198 | */ 199 | void state_save(const uint8_t *state_buffer, uint32_t length) 200 | { 201 | // ... 202 | // Save the string some form of non-volatile memory, if possible. 203 | // ... 204 | } 205 | 206 | /*! 207 | * @brief Load library config from non-volatile memory 208 | * 209 | * @param[in,out] config_buffer buffer to hold the loaded state string 210 | * @param[in] n_buffer size of the allocated state buffer 211 | * 212 | * @return number of bytes copied to config_buffer 213 | */ 214 | uint32_t config_load(uint8_t *config_buffer, uint32_t n_buffer) 215 | { 216 | // ... 217 | // Load a library config from non-volatile memory, if available. 218 | // 219 | // Return zero if loading was unsuccessful or no config was available, 220 | // otherwise return length of loaded config string. 221 | // ... 222 | return 0; 223 | } 224 | 225 | /*! 226 | * @brief Main function which configures BSEC library and then reads and processes the data from sensor based 227 | * on timer ticks 228 | * 229 | * @return result of the processing 230 | */ 231 | int main() 232 | { 233 | return_values_init ret; 234 | 235 | /* Call to the function which initializes the BSEC library 236 | * Switch on low-power mode and provide no temperature offset */ 237 | ret = bsec_iot_init(BSEC_SAMPLE_RATE_LP, 0.0f, bus_write, bus_read, sleep, state_load, config_load); 238 | if (ret.bme680_status) 239 | { 240 | /* Could not intialize BME680 */ 241 | return (int)ret.bme680_status; 242 | } 243 | else if (ret.bsec_status) 244 | { 245 | /* Could not intialize BSEC library */ 246 | return (int)ret.bsec_status; 247 | } 248 | 249 | /* Call to endless loop function which reads and processes data based on sensor settings */ 250 | /* State is saved every 10.000 samples, which means every 10.000 * 3 secs = 500 minutes */ 251 | bsec_iot_loop(sleep, get_timestamp_us, output_ready, state_save, 10000); 252 | 253 | return 0; 254 | } 255 | 256 | /*! @}*/ 257 | 258 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/example/bsec_iot_example.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Robert Bosch. All Rights Reserved. 3 | * 4 | * Disclaimer 5 | * 6 | * Common: 7 | * Bosch Sensortec products are developed for the consumer goods industry. They may only be used 8 | * within the parameters of the respective valid product data sheet. Bosch Sensortec products are 9 | * provided with the express understanding that there is no warranty of fitness for a particular purpose. 10 | * They are not fit for use in life-sustaining, safety or security sensitive systems or any system or device 11 | * that may lead to bodily harm or property damage if the system or device malfunctions. In addition, 12 | * Bosch Sensortec products are not fit for use in products which interact with motor vehicle systems. 13 | * The resale and/or use of products are at the purchasers own risk and his own responsibility. The 14 | * examination of fitness for the intended use is the sole responsibility of the Purchaser. 15 | * 16 | * The purchaser shall indemnify Bosch Sensortec from all third party claims, including any claims for 17 | * incidental, or consequential damages, arising from any product use not covered by the parameters of 18 | * the respective valid product data sheet or not approved by Bosch Sensortec and reimburse Bosch 19 | * Sensortec for all costs in connection with such claims. 20 | * 21 | * The purchaser must monitor the market for the purchased products, particularly with regard to 22 | * product safety and inform Bosch Sensortec without delay of all security relevant incidents. 23 | * 24 | * Engineering Samples are marked with an asterisk (*) or (e). Samples may vary from the valid 25 | * technical specifications of the product series. They are therefore not intended or fit for resale to third 26 | * parties or for use in end products. Their sole purpose is internal client testing. The testing of an 27 | * engineering sample may in no way replace the testing of a product series. Bosch Sensortec 28 | * assumes no liability for the use of engineering samples. By accepting the engineering samples, the 29 | * Purchaser agrees to indemnify Bosch Sensortec from all claims arising from the use of engineering 30 | * samples. 31 | * 32 | * Special: 33 | * This software module (hereinafter called "Software") and any information on application-sheets 34 | * (hereinafter called "Information") is provided free of charge for the sole purpose to support your 35 | * application work. The Software and Information is subject to the following terms and conditions: 36 | * 37 | * The Software is specifically designed for the exclusive use for Bosch Sensortec products by 38 | * personnel who have special experience and training. Do not use this Software if you do not have the 39 | * proper experience or training. 40 | * 41 | * This Software package is provided `` as is `` and without any expressed or implied warranties, 42 | * including without limitation, the implied warranties of merchantability and fitness for a particular 43 | * purpose. 44 | * 45 | * Bosch Sensortec and their representatives and agents deny any liability for the functional impairment 46 | * of this Software in terms of fitness, performance and safety. Bosch Sensortec and their 47 | * representatives and agents shall not be liable for any direct or indirect damages or injury, except as 48 | * otherwise stipulated in mandatory applicable law. 49 | * 50 | * The Information provided is believed to be accurate and reliable. Bosch Sensortec assumes no 51 | * responsibility for the consequences of use of such Information nor for any infringement of patents or 52 | * other rights of third parties which may result from its use. No license is granted by implication or 53 | * otherwise under any patent or patent rights of Bosch. Specifications mentioned in the Information are 54 | * subject to change without notice. 55 | * 56 | * It is not allowed to deliver the source code of the Software to any third party without permission of 57 | * Bosch Sensortec. 58 | * 59 | */ 60 | 61 | /*! 62 | * @file bsec_iot_example.ino 63 | * 64 | * @brief 65 | * Example for using of BSEC library in a fixed configuration with the BME680 sensor. 66 | * This works by running an endless loop in the bsec_iot_loop() function. 67 | */ 68 | 69 | /*! 70 | * @addtogroup bsec_examples BSEC Examples 71 | * @brief BSEC usage examples 72 | * @{*/ 73 | 74 | /**********************************************************************************************************************/ 75 | /* header files */ 76 | /**********************************************************************************************************************/ 77 | 78 | #include "bsec_integration.h" 79 | #include 80 | 81 | /**********************************************************************************************************************/ 82 | /* functions */ 83 | /**********************************************************************************************************************/ 84 | 85 | /*! 86 | * @brief Write operation in either Wire or SPI 87 | * 88 | * param[in] dev_addr Wire or SPI device address 89 | * param[in] reg_addr register address 90 | * param[in] reg_data_ptr pointer to the data to be written 91 | * param[in] data_len number of bytes to be written 92 | * 93 | * @return result of the bus communication function 94 | */ 95 | int8_t bus_write(uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data_ptr, uint16_t data_len) 96 | { 97 | Wire.beginTransmission(dev_addr); 98 | Wire.write(reg_addr); /* Set register address to start writing to */ 99 | 100 | /* Write the data */ 101 | for (int index = 0; index < data_len; index++) { 102 | Wire.write(reg_data_ptr[index]); 103 | } 104 | 105 | return (int8_t)Wire.endTransmission(); 106 | } 107 | 108 | /*! 109 | * @brief Read operation in either Wire or SPI 110 | * 111 | * param[in] dev_addr Wire or SPI device address 112 | * param[in] reg_addr register address 113 | * param[out] reg_data_ptr pointer to the memory to be used to store the read data 114 | * param[in] data_len number of bytes to be read 115 | * 116 | * @return result of the bus communication function 117 | */ 118 | int8_t bus_read(uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data_ptr, uint16_t data_len) 119 | { 120 | int8_t comResult = 0; 121 | Wire.beginTransmission(dev_addr); 122 | Wire.write(reg_addr); /* Set register address to start reading from */ 123 | comResult = Wire.endTransmission(); 124 | 125 | delayMicroseconds(150); /* Precautionary response delay */ 126 | Wire.requestFrom(dev_addr, (uint8_t)data_len); /* Request data */ 127 | 128 | int index = 0; 129 | while (Wire.available()) /* The slave device may send less than requested (burst read) */ 130 | { 131 | reg_data_ptr[index] = Wire.read(); 132 | index++; 133 | } 134 | 135 | return comResult; 136 | } 137 | 138 | /*! 139 | * @brief System specific implementation of sleep function 140 | * 141 | * @param[in] t_ms time in milliseconds 142 | * 143 | * @return none 144 | */ 145 | void sleep(uint32_t t_ms) 146 | { 147 | delay(t_ms); 148 | } 149 | 150 | /*! 151 | * @brief Capture the system time in microseconds 152 | * 153 | * @return system_current_time current system timestamp in microseconds 154 | */ 155 | int64_t get_timestamp_us() 156 | { 157 | return (int64_t) millis() * 1000; 158 | } 159 | 160 | /*! 161 | * @brief Handling of the ready outputs 162 | * 163 | * @param[in] timestamp time in nanoseconds 164 | * @param[in] iaq IAQ signal 165 | * @param[in] iaq_accuracy accuracy of IAQ signal 166 | * @param[in] temperature temperature signal 167 | * @param[in] humidity humidity signal 168 | * @param[in] pressure pressure signal 169 | * @param[in] raw_temperature raw temperature signal 170 | * @param[in] raw_humidity raw humidity signal 171 | * @param[in] gas raw gas sensor signal 172 | * @param[in] bsec_status value returned by the bsec_do_steps() call 173 | * 174 | * @return none 175 | */ 176 | void output_ready(int64_t timestamp, float iaq, uint8_t iaq_accuracy, float temperature, float humidity, 177 | float pressure, float raw_temperature, float raw_humidity, float gas, bsec_library_return_t bsec_status) 178 | { 179 | Serial.print("["); 180 | Serial.print(timestamp/1e6); 181 | Serial.print("] T: "); 182 | Serial.print(temperature); 183 | Serial.print("| rH: "); 184 | Serial.print(humidity); 185 | Serial.print("| IAQ: "); 186 | Serial.print(iaq); 187 | Serial.print(" ("); 188 | Serial.print(iaq_accuracy); 189 | Serial.println(")"); 190 | } 191 | 192 | /*! 193 | * @brief Load previous library state from non-volatile memory 194 | * 195 | * @param[in,out] state_buffer buffer to hold the loaded state string 196 | * @param[in] n_buffer size of the allocated state buffer 197 | * 198 | * @return number of bytes copied to state_buffer 199 | */ 200 | uint32_t state_load(uint8_t *state_buffer, uint32_t n_buffer) 201 | { 202 | // ... 203 | // Load a previous library state from non-volatile memory, if available. 204 | // 205 | // Return zero if loading was unsuccessful or no state was available, 206 | // otherwise return length of loaded state string. 207 | // ... 208 | return 0; 209 | } 210 | 211 | /*! 212 | * @brief Save library state to non-volatile memory 213 | * 214 | * @param[in] state_buffer buffer holding the state to be stored 215 | * @param[in] length length of the state string to be stored 216 | * 217 | * @return none 218 | */ 219 | void state_save(const uint8_t *state_buffer, uint32_t length) 220 | { 221 | // ... 222 | // Save the string some form of non-volatile memory, if possible. 223 | // ... 224 | } 225 | 226 | /*! 227 | * @brief Load library config from non-volatile memory 228 | * 229 | * @param[in,out] config_buffer buffer to hold the loaded state string 230 | * @param[in] n_buffer size of the allocated state buffer 231 | * 232 | * @return number of bytes copied to config_buffer 233 | */ 234 | uint32_t config_load(uint8_t *config_buffer, uint32_t n_buffer) 235 | { 236 | // ... 237 | // Load a library config from non-volatile memory, if available. 238 | // 239 | // Return zero if loading was unsuccessful or no config was available, 240 | // otherwise return length of loaded config string. 241 | // ... 242 | return 0; 243 | } 244 | 245 | /*! 246 | * @brief Main function which configures BSEC library and then reads and processes the data from sensor based 247 | * on timer ticks 248 | * 249 | * @return result of the processing 250 | */ 251 | void setup() 252 | { 253 | return_values_init ret; 254 | 255 | /* Init I2C and serial communication */ 256 | Wire.begin(); 257 | Serial.begin(115200); 258 | 259 | /* Call to the function which initializes the BSEC library 260 | * Switch on low-power mode and provide no temperature offset */ 261 | ret = bsec_iot_init(BSEC_SAMPLE_RATE_LP, 5.0f, bus_write, bus_read, sleep, state_load, config_load); 262 | if (ret.bme680_status) 263 | { 264 | /* Could not intialize BME680 */ 265 | Serial.println("Error while initializing BME680"); 266 | return; 267 | } 268 | else if (ret.bsec_status) 269 | { 270 | /* Could not intialize BSEC library */ 271 | Serial.println("Error while initializing BSEC library"); 272 | return; 273 | } 274 | 275 | /* Call to endless loop function which reads and processes data based on sensor settings */ 276 | /* State is saved every 10.000 samples, which means every 10.000 * 3 secs = 500 minutes */ 277 | bsec_iot_loop(sleep, get_timestamp_us, output_ready, state_save, 10000); 278 | } 279 | 280 | void loop() 281 | { 282 | } 283 | 284 | /*! @}*/ 285 | 286 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/example/bsec_iot_ulp_plus_example.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Robert Bosch. All Rights Reserved. 3 | * 4 | * Disclaimer 5 | * 6 | * Common: 7 | * Bosch Sensortec products are developed for the consumer goods industry. They may only be used 8 | * within the parameters of the respective valid product data sheet. Bosch Sensortec products are 9 | * provided with the express understanding that there is no warranty of fitness for a particular purpose. 10 | * They are not fit for use in life-sustaining, safety or security sensitive systems or any system or device 11 | * that may lead to bodily harm or property damage if the system or device malfunctions. In addition, 12 | * Bosch Sensortec products are not fit for use in products which interact with motor vehicle systems. 13 | * The resale and/or use of products are at the purchasers own risk and his own responsibility. The 14 | * examination of fitness for the intended use is the sole responsibility of the Purchaser. 15 | * 16 | * The purchaser shall indemnify Bosch Sensortec from all third party claims, including any claims for 17 | * incidental, or consequential damages, arising from any product use not covered by the parameters of 18 | * the respective valid product data sheet or not approved by Bosch Sensortec and reimburse Bosch 19 | * Sensortec for all costs in connection with such claims. 20 | * 21 | * The purchaser must monitor the market for the purchased products, particularly with regard to 22 | * product safety and inform Bosch Sensortec without delay of all security relevant incidents. 23 | * 24 | * Engineering Samples are marked with an asterisk (*) or (e). Samples may vary from the valid 25 | * technical specifications of the product series. They are therefore not intended or fit for resale to third 26 | * parties or for use in end products. Their sole purpose is internal client testing. The testing of an 27 | * engineering sample may in no way replace the testing of a product series. Bosch Sensortec 28 | * assumes no liability for the use of engineering samples. By accepting the engineering samples, the 29 | * Purchaser agrees to indemnify Bosch Sensortec from all claims arising from the use of engineering 30 | * samples. 31 | * 32 | * Special: 33 | * This software module (hereinafter called "Software") and any information on application-sheets 34 | * (hereinafter called "Information") is provided free of charge for the sole purpose to support your 35 | * application work. The Software and Information is subject to the following terms and conditions: 36 | * 37 | * The Software is specifically designed for the exclusive use for Bosch Sensortec products by 38 | * personnel who have special experience and training. Do not use this Software if you do not have the 39 | * proper experience or training. 40 | * 41 | * This Software package is provided `` as is `` and without any expressed or implied warranties, 42 | * including without limitation, the implied warranties of merchantability and fitness for a particular 43 | * purpose. 44 | * 45 | * Bosch Sensortec and their representatives and agents deny any liability for the functional impairment 46 | * of this Software in terms of fitness, performance and safety. Bosch Sensortec and their 47 | * representatives and agents shall not be liable for any direct or indirect damages or injury, except as 48 | * otherwise stipulated in mandatory applicable law. 49 | * 50 | * The Information provided is believed to be accurate and reliable. Bosch Sensortec assumes no 51 | * responsibility for the consequences of use of such Information nor for any infringement of patents or 52 | * other rights of third parties which may result from its use. No license is granted by implication or 53 | * otherwise under any patent or patent rights of Bosch. Specifications mentioned in the Information are 54 | * subject to change without notice. 55 | * 56 | * It is not allowed to deliver the source code of the Software to any third party without permission of 57 | * Bosch Sensortec. 58 | * 59 | */ 60 | 61 | /*! 62 | * @file bsec_iot_ulp_plus_example.c 63 | * 64 | * @brief 65 | * Example for using of BSEC library in a fixed configuration with the BME680 sensor. 66 | * This works by running an endless loop in the bsec_iot_loop() function. 67 | */ 68 | 69 | /*! 70 | * @addtogroup bsec_examples BSEC Examples 71 | * @brief BSEC usage examples 72 | * @{*/ 73 | 74 | /**********************************************************************************************************************/ 75 | /* header files */ 76 | /**********************************************************************************************************************/ 77 | /* BSEC configuration files are available in the config/ folder of the release package. Please chose a configuration file with 3s maximum time between `bsec_sensor_control()` calls */ 78 | #include "bsec_integration.h" 79 | 80 | /**********************************************************************************************************************/ 81 | /* functions */ 82 | /**********************************************************************************************************************/ 83 | 84 | /*! 85 | * @brief Write operation in either I2C or SPI 86 | * 87 | * param[in] dev_addr I2C or SPI device address 88 | * param[in] reg_addr register address 89 | * param[in] reg_data_ptr pointer to the data to be written 90 | * param[in] data_len number of bytes to be written 91 | * 92 | * @return result of the bus communication function 93 | */ 94 | int8_t bus_write(uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data_ptr, uint16_t data_len) 95 | { 96 | // ... 97 | // Please insert system specific function to write to the bus where BME680 is connected 98 | // ... 99 | return 0; 100 | } 101 | 102 | /*! 103 | * @brief Read operation in either I2C or SPI 104 | * 105 | * param[in] dev_addr I2C or SPI device address 106 | * param[in] reg_addr register address 107 | * param[out] reg_data_ptr pointer to the memory to be used to store the read data 108 | * param[in] data_len number of bytes to be read 109 | * 110 | * @return result of the bus communication function 111 | */ 112 | int8_t bus_read(uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data_ptr, uint16_t data_len) 113 | { 114 | // ... 115 | // Please insert system specific function to read from bus where BME680 is connected 116 | // ... 117 | return 0; 118 | } 119 | 120 | /*! 121 | * @brief System specific implementation of sleep function 122 | * 123 | * @param[in] t_ms time in milliseconds 124 | * 125 | * @return none 126 | */ 127 | void sleep(uint32_t t_ms) 128 | { 129 | // ... 130 | // Please insert system specific function sleep or delay for t_ms milliseconds 131 | // ... 132 | } 133 | 134 | /*! 135 | * @brief Capture the system time in microseconds 136 | * 137 | * @return system_current_time current system timestamp in microseconds 138 | */ 139 | int64_t get_timestamp_us() 140 | { 141 | int64_t system_current_time = 0; 142 | // ... 143 | // Please insert system specific function to retrieve a timestamp (in microseconds) 144 | // ... 145 | return system_current_time; 146 | } 147 | 148 | /*! 149 | * @brief Handling of the ready outputs 150 | * 151 | * @param[in] timestamp time in nanoseconds 152 | * @param[in] iaq IAQ signal 153 | * @param[in] iaq_accuracy accuracy of IAQ signal 154 | * @param[in] temperature temperature signal 155 | * @param[in] humidity humidity signal 156 | * @param[in] pressure pressure signal 157 | * @param[in] raw_temperature raw temperature signal 158 | * @param[in] raw_humidity raw humidity signal 159 | * @param[in] gas raw gas sensor signal 160 | * @param[in] bsec_status value returned by the bsec_do_steps() call 161 | * 162 | * @return none 163 | */ 164 | void output_ready(int64_t timestamp, float iaq, uint8_t iaq_accuracy, float temperature, float humidity, 165 | float pressure, float raw_temperature, float raw_humidity, float gas, bsec_library_return_t bsec_status) 166 | { 167 | // ... 168 | // Please insert system specific code to further process or display the BSEC outputs 169 | // ... 170 | } 171 | 172 | /*! 173 | * @brief Load previous library state from non-volatile memory 174 | * 175 | * @param[in,out] state_buffer buffer to hold the loaded state string 176 | * @param[in] n_buffer size of the allocated state buffer 177 | * 178 | * @return number of bytes copied to state_buffer 179 | */ 180 | uint32_t state_load(uint8_t *state_buffer, uint32_t n_buffer) 181 | { 182 | // ... 183 | // Load a previous library state from non-volatile memory, if available. 184 | // 185 | // Return zero if loading was unsuccessful or no state was available, 186 | // otherwise return length of loaded state string. 187 | // ... 188 | return 0; 189 | } 190 | 191 | /*! 192 | * @brief Save library state to non-volatile memory 193 | * 194 | * @param[in] state_buffer buffer holding the state to be stored 195 | * @param[in] length length of the state string to be stored 196 | * 197 | * @return none 198 | */ 199 | void state_save(const uint8_t *state_buffer, uint32_t length) 200 | { 201 | // ... 202 | // Save the string some form of non-volatile memory, if possible. 203 | // ... 204 | } 205 | 206 | /*! 207 | * @brief Load library config from non-volatile memory 208 | * 209 | * @param[in,out] config_buffer buffer to hold the loaded state string 210 | * @param[in] n_buffer size of the allocated state buffer 211 | * 212 | * @return number of bytes copied to config_buffer 213 | */ 214 | uint32_t config_load(uint8_t *config_buffer, uint32_t n_buffer) 215 | { 216 | // ... 217 | // Load a library config from non-volatile memory, if available. 218 | // 219 | // Return zero if loading was unsuccessful or no config was available, 220 | // otherwise return length of loaded config string. 221 | // ... 222 | return 0; 223 | } 224 | 225 | /*! 226 | * @brief Interrupt handler for press of a ULP plus button 227 | * 228 | * @return none 229 | */ 230 | void ulp_plus_button_press() 231 | { 232 | /* We call bsec_update_subscription() in order to instruct BSEC to perform an extra measurement at the next 233 | * possible time slot 234 | */ 235 | 236 | bsec_sensor_configuration_t requested_virtual_sensors[1]; 237 | uint8_t n_requested_virtual_sensors = 1; 238 | bsec_sensor_configuration_t required_sensor_settings[BSEC_MAX_PHYSICAL_SENSOR]; 239 | uint8_t n_required_sensor_settings = BSEC_MAX_PHYSICAL_SENSOR; 240 | bsec_library_return_t status = BSEC_OK; 241 | 242 | /* To trigger a ULP plus, we request the IAQ virtual sensor with a specific sample rate code */ 243 | requested_virtual_sensors[0].sensor_id = BSEC_OUTPUT_IAQ_ESTIMATE; 244 | requested_virtual_sensors[0].sample_rate = BSEC_SAMPLE_RATE_ULP_MEASUREMENT_ON_DEMAND; 245 | 246 | /* Call bsec_update_subscription() to enable/disable the requested virtual sensors */ 247 | status = bsec_update_subscription(requested_virtual_sensors, n_requested_virtual_sensors, required_sensor_settings, 248 | &n_required_sensor_settings); 249 | 250 | /* The status code would tell is if the request was accepted. It will be rejected if the sensor is not already in 251 | * ULP mode, or if the time difference between requests is too short, for example. */ 252 | } 253 | 254 | /*! 255 | * @brief Main function which configures BSEC library and then reads and processes the data from sensor based 256 | * on timer ticks 257 | * 258 | * @return result of the processing 259 | */ 260 | int main() 261 | { 262 | return_values_init ret; 263 | // ... 264 | // Attach a button (or other) interrupt here to the ulp_plus_button_press() handler function to 265 | // enable this interrupt to trigger a ULP plus 266 | // ... 267 | 268 | /* Call to the function which initializes the BSEC library 269 | * Switch on ultra_low-power mode and provide no temperature offset */ 270 | ret = bsec_iot_init(BSEC_SAMPLE_RATE_ULP, 0.0f, bus_write, bus_read, sleep, state_load, config_load); 271 | if (ret.bme680_status) 272 | { 273 | /* Could not intialize BME680 or BSEC library */ 274 | return (int)ret.bme680_status; 275 | } 276 | else if (ret.bsec_status) 277 | { 278 | /* Could not intialize BSEC library */ 279 | return (int)ret.bsec_status; 280 | } 281 | /* Call to endless loop function which reads and processes data based on sensor settings */ 282 | /* State is saved every 10.000 samples, which means every 100 * 300 secs = 500 minutes */ 283 | bsec_iot_loop(sleep, get_timestamp_us, output_ready, state_save, 100); 284 | 285 | return 0; 286 | } 287 | 288 | /*! @}*/ 289 | 290 | -------------------------------------------------------------------------------- /src/BSEC_1.4.6.0_Generic_Release_20180425/example/bsec_iot_ulp_plus_example.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Robert Bosch. All Rights Reserved. 3 | * 4 | * Disclaimer 5 | * 6 | * Common: 7 | * Bosch Sensortec products are developed for the consumer goods industry. They may only be used 8 | * within the parameters of the respective valid product data sheet. Bosch Sensortec products are 9 | * provided with the express understanding that there is no warranty of fitness for a particular purpose. 10 | * They are not fit for use in life-sustaining, safety or security sensitive systems or any system or device 11 | * that may lead to bodily harm or property damage if the system or device malfunctions. In addition, 12 | * Bosch Sensortec products are not fit for use in products which interact with motor vehicle systems. 13 | * The resale and/or use of products are at the purchasers own risk and his own responsibility. The 14 | * examination of fitness for the intended use is the sole responsibility of the Purchaser. 15 | * 16 | * The purchaser shall indemnify Bosch Sensortec from all third party claims, including any claims for 17 | * incidental, or consequential damages, arising from any product use not covered by the parameters of 18 | * the respective valid product data sheet or not approved by Bosch Sensortec and reimburse Bosch 19 | * Sensortec for all costs in connection with such claims. 20 | * 21 | * The purchaser must monitor the market for the purchased products, particularly with regard to 22 | * product safety and inform Bosch Sensortec without delay of all security relevant incidents. 23 | * 24 | * Engineering Samples are marked with an asterisk (*) or (e). Samples may vary from the valid 25 | * technical specifications of the product series. They are therefore not intended or fit for resale to third 26 | * parties or for use in end products. Their sole purpose is internal client testing. The testing of an 27 | * engineering sample may in no way replace the testing of a product series. Bosch Sensortec 28 | * assumes no liability for the use of engineering samples. By accepting the engineering samples, the 29 | * Purchaser agrees to indemnify Bosch Sensortec from all claims arising from the use of engineering 30 | * samples. 31 | * 32 | * Special: 33 | * This software module (hereinafter called "Software") and any information on application-sheets 34 | * (hereinafter called "Information") is provided free of charge for the sole purpose to support your 35 | * application work. The Software and Information is subject to the following terms and conditions: 36 | * 37 | * The Software is specifically designed for the exclusive use for Bosch Sensortec products by 38 | * personnel who have special experience and training. Do not use this Software if you do not have the 39 | * proper experience or training. 40 | * 41 | * This Software package is provided `` as is `` and without any expressed or implied warranties, 42 | * including without limitation, the implied warranties of merchantability and fitness for a particular 43 | * purpose. 44 | * 45 | * Bosch Sensortec and their representatives and agents deny any liability for the functional impairment 46 | * of this Software in terms of fitness, performance and safety. Bosch Sensortec and their 47 | * representatives and agents shall not be liable for any direct or indirect damages or injury, except as 48 | * otherwise stipulated in mandatory applicable law. 49 | * 50 | * The Information provided is believed to be accurate and reliable. Bosch Sensortec assumes no 51 | * responsibility for the consequences of use of such Information nor for any infringement of patents or 52 | * other rights of third parties which may result from its use. No license is granted by implication or 53 | * otherwise under any patent or patent rights of Bosch. Specifications mentioned in the Information are 54 | * subject to change without notice. 55 | * 56 | * It is not allowed to deliver the source code of the Software to any third party without permission of 57 | * Bosch Sensortec. 58 | * 59 | */ 60 | 61 | /*! 62 | * @file bsec_iot_ulp_plus_example.ino 63 | * 64 | * @brief 65 | * Example for using of BSEC library in a fixed configuration with the BME680 sensor. 66 | * This works by running an endless loop in the bsec_iot_loop() function. 67 | */ 68 | 69 | /*! 70 | * @addtogroup bsec_examples BSEC Examples 71 | * @brief BSEC usage examples 72 | * @{*/ 73 | 74 | /**********************************************************************************************************************/ 75 | /* header files */ 76 | /**********************************************************************************************************************/ 77 | 78 | #include "bsec_integration.h" 79 | #include "bsec_serialized_configurations_iaq.h" 80 | #include 81 | 82 | /**********************************************************************************************************************/ 83 | /* functions */ 84 | /**********************************************************************************************************************/ 85 | 86 | /*! 87 | * @brief Write operation in either Wire or SPI 88 | * 89 | * param[in] dev_addr Wire or SPI device address 90 | * param[in] reg_addr register address 91 | * param[in] reg_data_ptr pointer to the data to be written 92 | * param[in] data_len number of bytes to be written 93 | * 94 | * @return result of the bus communication function 95 | */ 96 | int8_t bus_write(uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data_ptr, uint16_t data_len) 97 | { 98 | Wire.beginTransmission(dev_addr); 99 | Wire.write(reg_addr); /* Set register address to start writing to */ 100 | 101 | /* Write the data */ 102 | for (int index = 0; index < data_len; index++) { 103 | Wire.write(reg_data_ptr[index]); 104 | } 105 | 106 | return (int8_t)Wire.endTransmission(); 107 | } 108 | 109 | /*! 110 | * @brief Read operation in either Wire or SPI 111 | * 112 | * param[in] dev_addr Wire or SPI device address 113 | * param[in] reg_addr register address 114 | * param[out] reg_data_ptr pointer to the memory to be used to store the read data 115 | * param[in] data_len number of bytes to be read 116 | * 117 | * @return result of the bus communication function 118 | */ 119 | int8_t bus_read(uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data_ptr, uint16_t data_len) 120 | { 121 | int8_t comResult = 0; 122 | Wire.beginTransmission(dev_addr); 123 | Wire.write(reg_addr); /* Set register address to start reading from */ 124 | comResult = Wire.endTransmission(); 125 | 126 | delayMicroseconds(150); /* Precautionary response delay */ 127 | Wire.requestFrom(dev_addr, (uint8_t)data_len); /* Request data */ 128 | 129 | int index = 0; 130 | while (Wire.available()) /* The slave device may send less than requested (burst read) */ 131 | { 132 | reg_data_ptr[index] = Wire.read(); 133 | index++; 134 | } 135 | 136 | return comResult; 137 | } 138 | 139 | /*! 140 | * @brief System specific implementation of sleep function 141 | * 142 | * @param[in] t_ms time in milliseconds 143 | * 144 | * @return none 145 | */ 146 | void sleep(uint32_t t_ms) 147 | { 148 | delay(t_ms); 149 | } 150 | 151 | /*! 152 | * @brief Capture the system time in microseconds 153 | * 154 | * @return system_current_time current system timestamp in microseconds 155 | */ 156 | int64_t get_timestamp_us() 157 | { 158 | return (int64_t) millis() * 1000; 159 | } 160 | 161 | /*! 162 | * @brief Handling of the ready outputs 163 | * 164 | * @param[in] timestamp time in nanoseconds 165 | * @param[in] iaq IAQ signal 166 | * @param[in] iaq_accuracy accuracy of IAQ signal 167 | * @param[in] temperature temperature signal 168 | * @param[in] humidity humidity signal 169 | * @param[in] pressure pressure signal 170 | * @param[in] raw_temperature raw temperature signal 171 | * @param[in] raw_humidity raw humidity signal 172 | * @param[in] gas raw gas sensor signal 173 | * @param[in] bsec_status value returned by the bsec_do_steps() call 174 | * 175 | * @return none 176 | */ 177 | void output_ready(int64_t timestamp, float iaq, uint8_t iaq_accuracy, float temperature, float humidity, 178 | float pressure, float raw_temperature, float raw_humidity, float gas, bsec_library_return_t bsec_status) 179 | { 180 | Serial.print("["); 181 | Serial.print(timestamp/1e6); 182 | Serial.print("] T: "); 183 | Serial.print(temperature); 184 | Serial.print("| rH: "); 185 | Serial.print(humidity); 186 | Serial.print("| IAQ: "); 187 | Serial.print(iaq); 188 | Serial.print(" ("); 189 | Serial.print(iaq_accuracy); 190 | Serial.println(")"); 191 | } 192 | 193 | /*! 194 | * @brief Load previous library state from non-volatile memory 195 | * 196 | * @param[in,out] state_buffer buffer to hold the loaded state string 197 | * @param[in] n_buffer size of the allocated state buffer 198 | * 199 | * @return number of bytes copied to state_buffer 200 | */ 201 | uint32_t state_load(uint8_t *state_buffer, uint32_t n_buffer) 202 | { 203 | // ... 204 | // Load a previous library state from non-volatile memory, if available. 205 | // 206 | // Return zero if loading was unsuccessful or no state was available, 207 | // otherwise return length of loaded state string. 208 | // ... 209 | return 0; 210 | } 211 | 212 | /*! 213 | * @brief Save library state to non-volatile memory 214 | * 215 | * @param[in] state_buffer buffer holding the state to be stored 216 | * @param[in] length length of the state string to be stored 217 | * 218 | * @return none 219 | */ 220 | void state_save(const uint8_t *state_buffer, uint32_t length) 221 | { 222 | // ... 223 | // Save the string some form of non-volatile memory, if possible. 224 | // ... 225 | } 226 | 227 | /*! 228 | * @brief Load library config from non-volatile memory 229 | * 230 | * @param[in,out] config_buffer buffer to hold the loaded state string 231 | * @param[in] n_buffer size of the allocated state buffer 232 | * 233 | * @return number of bytes copied to config_buffer 234 | */ 235 | uint32_t config_load(uint8_t *config_buffer, uint32_t n_buffer) 236 | { 237 | // ... 238 | // Load a library config from non-volatile memory, if available. 239 | // 240 | // Return zero if loading was unsuccessful or no config was available, 241 | // otherwise return length of loaded config string. 242 | // ... 243 | 244 | memcpy(config_buffer, bsec_config_iaq, sizeof(bsec_config_iaq)); 245 | return sizeof(bsec_config_iaq); 246 | } 247 | 248 | /*! 249 | * @brief Interrupt handler for press of a ULP plus button 250 | * 251 | * @return none 252 | */ 253 | void ulp_plus_button_press() 254 | { 255 | /* We call bsec_update_subscription() in order to instruct BSEC to perform an extra measurement at the next 256 | * possible time slot 257 | */ 258 | 259 | bsec_sensor_configuration_t requested_virtual_sensors[1]; 260 | uint8_t n_requested_virtual_sensors = 1; 261 | bsec_sensor_configuration_t required_sensor_settings[BSEC_MAX_PHYSICAL_SENSOR]; 262 | uint8_t n_required_sensor_settings = BSEC_MAX_PHYSICAL_SENSOR; 263 | bsec_library_return_t status = BSEC_OK; 264 | 265 | /* To trigger a ULP plus, we request the IAQ virtual sensor with a specific sample rate code */ 266 | requested_virtual_sensors[0].sensor_id = BSEC_OUTPUT_IAQ_ESTIMATE; 267 | requested_virtual_sensors[0].sample_rate = BSEC_SAMPLE_RATE_ULP_MEASUREMENT_ON_DEMAND; 268 | 269 | /* Call bsec_update_subscription() to enable/disable the requested virtual sensors */ 270 | status = bsec_update_subscription(requested_virtual_sensors, n_requested_virtual_sensors, required_sensor_settings, 271 | &n_required_sensor_settings); 272 | 273 | /* The status code would tell is if the request was accepted. It will be rejected if the sensor is not already in 274 | * ULP mode, or if the time difference between requests is too short, for example. */ 275 | if (status == BSEC_OK) 276 | { 277 | Serial.println("ULP plus triggered sucessfully."); 278 | } 279 | else 280 | { 281 | Serial.print("ULP plus request rejected. "); 282 | switch (status) 283 | { 284 | case BSEC_W_SC_MODEXCEEDULPTIMELIMIT: 285 | Serial.println("Request came within 20 s of a previous measurement."); 286 | break; 287 | case BSEC_W_SC_MODINSUFFICIENTWAITTIME: 288 | Serial.println("Request came within 20 s of a ULP plus."); 289 | break; 290 | case BSEC_W_SU_MODINNOULP: 291 | Serial.println("Sensor not in ULP mode."); 292 | break; 293 | } 294 | } 295 | } 296 | 297 | /*! 298 | * @brief Main function which configures BSEC library and then reads and processes the data from sensor based 299 | * on timer ticks 300 | * 301 | * @return result of the processing 302 | */ 303 | void setup() 304 | { 305 | return_values_init ret; 306 | 307 | /* Init I2C and serial communication */ 308 | Wire.begin(); 309 | Serial.begin(115200); 310 | 311 | /* Setup button interrupt to trigger ULP plus */ 312 | pinMode(2, INPUT_PULLUP); 313 | attachInterrupt(digitalPinToInterrupt(2), ulp_plus_button_press, FALLING); 314 | 315 | /* Call to the function which initializes the BSEC library 316 | * Switch on ultra_low-power mode and provide no temperature offset */ 317 | ret = bsec_iot_init(BSEC_SAMPLE_RATE_ULP, 5.0f, bus_write, bus_read, sleep, state_load, config_load); 318 | if (ret.bme680_status) 319 | { 320 | /* Could not intialize BME680 */ 321 | Serial.println("Error while initializing BME680"); 322 | return; 323 | } 324 | else if (ret.bsec_status) 325 | { 326 | /* Could not intialize BSEC library */ 327 | Serial.println("Error while initializing BSEC library"); 328 | return; 329 | } 330 | 331 | /* Call to endless loop function which reads and processes data based on sensor settings */ 332 | /* State is saved every 10.000 samples, which means every 100 * 300 secs = 500 minutes */ 333 | bsec_iot_loop(sleep, get_timestamp_us, output_ready, state_save, 100); 334 | } 335 | 336 | void loop() 337 | { 338 | } 339 | 340 | /*! @}*/ 341 | 342 | --------------------------------------------------------------------------------