Hi team,
Could you please explain how to acquire data from environmental sensors (BMP580/BME688) connected to the M3 SCL/SDA of the BHI360?
Our settings:
Hardware: Sony Spresense (Arduino-compatible development environment, with 1.8V I/O) + BHI360 shuttle board 3.0, I2C connection
Library: BHI360_SensorAPI (with minor modifications, using Wire library for I2C read/write functions instead of COINES SDK)
Firmware: Bosch_Shuttle3_BHI360_BMM350C_BMP580_BME688.fw.h
Current Status/Objective:
Using code based on the example quaternion.c, I believe I have successfully uploaded the firmware and obtained quaternions at about 100Hz. I would like to add temperature, humidity, and pressure acquisition at 2-10Hz, but I am unsure how to do this. Is there an explanation or an example similar to this?
Attempts/Results:
Based on quaternion acquisition, I added the following:
Passed the corresponding parse functions defined for BHI360_SENSOR_ID_TEMP/BHI360_SENSOR_ID_BARO/BHI360_SENSOR_ID_HUM to bhi360_register_fifo_parse_callback.
Passed the respective IDs and desired sampling rates and latencies (sensor_conf.sample_rate = 1.0f, sensor_conf.latency = 0f) to bhi360_virtual_sensor_conf_param_set_cfg.
Called bhi360_get_and_process_fifo(work_buffer, WORK_BUFFER_SIZE, &bhy) continuously in an infinite loop without terminating at loop < limit (=50).
→ It appears that the parse functions are not being called at the specified rate. All are specified at 1Hz, but the barometer sometimes returns the same value consecutively. The temperature and humidity are only received rarely and sporadically.
Thanks in advance.