01-31-2023 11:19 AM - edited 01-31-2023 11:25 AM
Hi all,
I am using BMI270 shuttle board 3.0 using the SPI interface and I can able to read accel and gyro values. But I need to develop code using FOC for that I used example code present in the BMI270-Sensor-API-master library in the git hub. The code is attached to my environment and works with errors. In that I need a few explanations on putting the sensor in the right position and keeping the sensor in the wrong position.
What does it mean to keep BMI270 in the right or wrong position? And I am facing OUT OF RANGE ERROR also.
I am new to this BMI270 sensor so I need help with that. Any help would be appreciated.
Thanks in advance.
With Regards,
Ragu.
01-31-2023 04:01 PM - edited 01-31-2023 04:02 PM
Hi Ragu,
Do you mean you run github code https://github.com/boschsensortec/BMI270-Sensor-API/blob/master/bmi270_examples/gyro_foc/gyro_foc.c?
What problems have you encountered? Could you describe it in detail when you use BMI270?
02-01-2023 07:07 AM - edited 02-01-2023 07:09 AM
Hi Robin,
yeah, I use the same code in github code https://github.com/boschsensortec/BMI270-Sensor-API/blob/master/bmi270_examples/gyro_foc/gyro_foc.c
The issue I am facing is, the code asks for two inputs from the user
1) Shake the sensor
2) Keep sensor stable in right position
First operation: shake the sensor:
I started to shake the sensor and the perform_foc_range_test function result is BMI2_OK( Valid input - Sensor is shaking.)
Second operation: Keep sensor stable in right position
I leave the sensor stable(not even touching it). In that case I get BMI2_E_OUT_OF_RANGE(-4) as a result.
So, I need to know is any specific position there to done this.
I need clarity on what is the right position. And same thing for accel_foc.c also.
Thanks,
P. Ragu.
03-24-2023 04:37 AM
Hi Ragu,
Sorry for the delayed reply.
The FOC is made to calibrate the offset, which requires the still sensor to read the sensor offset and calibrate it. When performing gyro FOC test, the sensor should be stationary, not shaken. The code has misunderstanding.