03-22-2019 02:42 PM
Hi all
I'm starting a new design and want to use the BMX160, but can't find the driver.
I've looked on the Bosch Sensortec GitHub page, but there is no driver there. https://github.com/BoschSensortec
The BMI160 driver is available on GitHub, but doesn't seem to be compatible with the BMX160.
Does anyone know where to download/clone the BMX160 driver?
Thanks
Solved! Go to Solution.
03-25-2019 07:38 AM
Hi rdehart,
At the moment we don't have a dedicated BMX160 driver released, but in the meantime you may reuse the BMI160 and BMM150 drivers. You will have to change the chip id in the bmi160_defs.h file to 0xD8. In addition, you can refer to example code here on how to configure the device and read out data from all 3 sensors.
Hope this helps.
Regards,
kgoveas
06-01-2019 06:10 PM
I found the example code in github(https://github.com/BoschSensortec/BMI160_driver/wiki/How-to-use-an-auxiliary-sensor-or-magnetometer-...), but I feel confused about the code.
The while loop in the example:
rslt = bmi160_set_fifo_config(fifo_config, BMI160_ENABLE, &bmi); /* Check rslt for any error codes */
while(rslt != 0)
{
......
}
Why the loop could run when the variable "rslt" is not zero?
06-03-2019 10:34 PM
Thank you
I'll try this
06-03-2019 10:53 PM
beansu,
rslt is the return result after each sensor read.
When rslt==0, the sensor is in an error state. This allows you to handle sensor errors.
In the WIKI example, the error is used to ensure no incorrect data is used in the program. If there are any errors, the program exits.