Closed lyusupov closed 3 weeks ago
Give me some time, I'm currently on vacation
This may be related to the fact that the Accelerometer's ODR has different values when used alone than with the gyro on. see from documentation.
@lyusupov
Linar .
I tested QMI today and found no change in acceleration value when turning on and off the gyroscope.
Tested turning on acceleration alone
Turning on acceleration and gyroscope
From the manual, we know that the output frequency of turning on acceleration alone comes from the internal oscillator. When turning on acceleration and gyroscope at the same time, the output frequency of both is changed to the output frequency of the gyroscope. My personal understanding is that only the output frequency is changed, and the data value will not be changed.
No, I tested it differently than you did. I configured the gyroscope and then disabled it. After testing, this may be related to the gyroscope's self-test.
After removing the self-test, enabling acceleration alone now works fine, the self-test usage was wrong before.
Thank you, Lewis!
I am unable to verify the sketch right now... If you are sure that the issue is no longer a factor after your fix - please, feel yourself free to close this ticket.
OK. I'll close it first. Feel free to open it if you have any questions.
Sketch: QMI8658_GetDataExample
Normal use case: when both gyro and accel are enabled - the getAccelerometer() function gives correct acceleration value
Issue: when gyro is disabled like that:
The workaround is to enable the gyro all the time like the SoftRF did ... But could we avoid that and get correct acceleration value regardless if the gyro is on or off ?