You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, you have done a great job. Recently I have played with MPU6050 and your code really helps me a lot. Thank you very much.
But as I follow the code line by line, I perhaps find something wrong.
In the line, you define the register of GYRO_CONFIG as 24 ( 24 = 0001 1000 ). And we can find the register GYRO_CONFIG on page 14 in the register map document. So with 0001 1000, we know the bit 3 and bit 4 are both 1. That is to say FS_SEL = 3. As I know, it means that you choose a Full Scale Range of +-2000 deg/s.
Now, we can see on page 31, with a Full Scale Range of +-2000 deg/s, the LSB sensitivity should be 16.4LSB/s.
But in your code, I see this. gyroXRate = gyroX/131 gyroYRate = gyroY/131
Should this be like that? gyroXRate = gyroX/16.4 gyroYRate = gyroY/16.4
The text was updated successfully, but these errors were encountered:
@Gaops , Thanks for the compliment. It means a lot. I was hooked with up with something else and this message of yours was overlooked. Sorry for that.
I think you are right. I will verify the math once again with the documents and update the code ASAP.
Thanks for taking your time to report this. Cheers!
First, you have done a great job. Recently I have played with MPU6050 and your code really helps me a lot. Thank you very much.
But as I follow the code line by line, I perhaps find something wrong.
bus.write_byte_data(DeviceAddress, GYRO_CONFIG, 24)
In the line, you define the register of GYRO_CONFIG as 24 ( 24 = 0001 1000 ). And we can find the register GYRO_CONFIG on page 14 in the register map document. So with 0001 1000, we know the bit 3 and bit 4 are both 1. That is to say FS_SEL = 3. As I know, it means that you choose a Full Scale Range of +-2000 deg/s.
Now, we can see on page 31, with a Full Scale Range of +-2000 deg/s, the LSB sensitivity should be 16.4LSB/s.
But in your code, I see this. gyroXRate = gyroX/131 gyroYRate = gyroY/131
Should this be like that? gyroXRate = gyroX/16.4 gyroYRate = gyroY/16.4
The text was updated successfully, but these errors were encountered: