SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
bhi360_aux_bmm350_bme688_iaq.ino File Reference

@license MIT License More...

#include <Wire.h>
#include <SPI.h>
#include <Arduino.h>
#include <ImuDrv.hpp>
#include <BoschFirmware.h>
Include dependency graph for bhi360_aux_bmm350_bme688_iaq.ino:

Go to the source code of this file.

Macros

#define USE_I2C_INTERFACE
 
#define BHI360_SDA   2
 
#define BHI360_SCL   3
 
#define BHI360_IRQ   8
 
#define BHI360_RST   -1
 
#define BOSCH_SHUTTLE3_BHI360_BMM350C_BME688_IAQ
 
#define USING_SENSOR_IRQ_METHOD
 

Functions

void dataReadyISR ()
 
void parse_sensor_data (uint8_t sensor_id, const uint8_t *data_ptr, uint32_t len, uint64_t *timestamp, void *user_data)
 
void progress_callback (uint32_t total, uint32_t transferred, void *user_data)
 
void printResult (uint8_t sensor_id, float sample_rate, bool rslt)
 
void setup ()
 
void loop ()
 

Variables

SensorBHI360 bhy
 
volatile bool isInterruptTriggered = false
 

Detailed Description

@license MIT License

Copyright (c) 2026 lewis he

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author
Lewis He (lewis.nosp@m.he@o.nosp@m.utloo.nosp@m.k.co.nosp@m.m)
Date
2026-02-11
Note
Changed from Boschsensortec API https://github.com/boschsensortec/BHY2_SensorAPI

Definition in file bhi360_aux_bmm350_bme688_iaq.ino.

Macro Definition Documentation

◆ BHI360_IRQ

#define BHI360_IRQ   8

Definition at line 78 of file bhi360_aux_bmm350_bme688_iaq.ino.

◆ BHI360_RST

#define BHI360_RST   -1

Definition at line 83 of file bhi360_aux_bmm350_bme688_iaq.ino.

◆ BHI360_SCL

#define BHI360_SCL   3

Definition at line 73 of file bhi360_aux_bmm350_bme688_iaq.ino.

◆ BHI360_SDA

#define BHI360_SDA   2

Definition at line 69 of file bhi360_aux_bmm350_bme688_iaq.ino.

◆ BOSCH_SHUTTLE3_BHI360_BMM350C_BME688_IAQ

#define BOSCH_SHUTTLE3_BHI360_BMM350C_BME688_IAQ

Definition at line 101 of file bhi360_aux_bmm350_bme688_iaq.ino.

◆ USE_I2C_INTERFACE

#define USE_I2C_INTERFACE

Definition at line 40 of file bhi360_aux_bmm350_bme688_iaq.ino.

◆ USING_SENSOR_IRQ_METHOD

#define USING_SENSOR_IRQ_METHOD

Definition at line 107 of file bhi360_aux_bmm350_bme688_iaq.ino.

Function Documentation

◆ dataReadyISR()

void dataReadyISR ( )

Definition at line 113 of file bhi360_aux_bmm350_bme688_iaq.ino.

References isInterruptTriggered.

Referenced by setup().

◆ loop()

void loop ( )

Definition at line 285 of file bhi360_aux_bmm350_bme688_iaq.ino.

References bhy, and isInterruptTriggered.

◆ parse_sensor_data()

void parse_sensor_data ( uint8_t  sensor_id,
const uint8_t *  data_ptr,
uint32_t  len,
uint64_t *  timestamp,
void *  user_data 
)

Definition at line 120 of file bhi360_aux_bmm350_bme688_iaq.ino.

References humidity(), pressure(), and temperature().

Referenced by setup().

◆ printResult()

void printResult ( uint8_t  sensor_id,
float  sample_rate,
bool  rslt 
)

Definition at line 171 of file bhi360_aux_bmm350_bme688_iaq.ino.

References bhy.

Referenced by setup().

◆ progress_callback()

void progress_callback ( uint32_t  total,
uint32_t  transferred,
void *  user_data 
)

Definition at line 163 of file bhi360_aux_bmm350_bme688_iaq.ino.

Referenced by setup().

◆ setup()

Variable Documentation

◆ bhy

Definition at line 86 of file bhi360_aux_bmm350_bme688_iaq.ino.

Referenced by loop(), printResult(), and setup().

◆ isInterruptTriggered

volatile bool isInterruptTriggered = false

Definition at line 111 of file bhi360_aux_bmm350_bme688_iaq.ino.

Referenced by dataReadyISR(), and loop().