06-02-2021 03:47 AM
Hello,
I want to know the way how to calibration all of the sensors(acc, gyro, mag) in BHI260AB.
1. If you have any guide documents for it, please let me get them.
2. "bhy2_set_calibration_profile", Do I have to use this for calibration? Then, let me get an example to do it.
3. In the Development Desktop 2.0, there is a "sensor status", but no changes. How do I see it?
Best Regards,
Solved! Go to Solution.
02-17-2022 02:29 AM
Hello,
You can register meta event and each sensor ID using our API.
https://github.com/BoschSensortec/BHY2-Sensor-API
And, especially for accel and gyro status, you always can get accuracy data when you get accel or Gyro data.
Please check bhy2_register_fifo_parse_callback in our example code.
When you register sensor ID, you just register accuracy as well as below.
rslt = bhy2_register_fifo_parse_callback(EULER_SENSOR_ID, parse_euler, (void*)&accuracy, &bhy2);
Please let me know if you have any question.
Thank you.
02-17-2022 12:16 PM
Hi Minhwan,
I've visited the API site you shared, but the function you mention doesn't seem to give accuracy information:
You mention that the 3rd parameter of the function bhy2_register_fifo_parse_callback is (void*)&accuracy. But in the API the 3rd parameter of that function is void *callback_ref: "Reference needed inside the callback function. Can be NULL".
But, since in my application I created the communication interface between my MCU and the BHI chip (I don't use the API), could you please let me know where in the datasheet says that the accel/gyro calibration status can be asked?
Thanks!
02-17-2022 06:36 PM
Hi,
Let me explain based on euler example.
https://github.com/BoschSensortec/BHY2-Sensor-API/blob/master/examples/euler/euler.c
First, you need to register your sensor with accuracy.
rslt = bhy2_register_fifo_parse_callback(EULER_SENSOR_ID, parse_euler, (void*)&accuracy, &bhy2); |
Then, when parse_euler is called, accuracy is updated. Please check parse_euler function.
Thank you.
02-17-2022 07:22 PM
Hi Minhwan,
I understand the example now. Thanks.
However, the API does the same as I'm doing. It registers any new "Sensor Status" meta event and stores the last accuracy value. But this information is taken from the BHI chip if the accuracy value changes. There seems to be no way to ask the chip for the accuracy status.
Here's my question again:
Is there some way to ask the BHI chip for the current accuracy status of a certain virtual sensor instead of waiting for the accuracy change event? Forget about the bhy2 API, now talking on the datasheet/chip level.
BR
02-17-2022 07:32 PM
Hi Minhwan,
I found it:
Thanks