ElectronicCats / mpu6050

MPU6050 Arduino Library
MIT License
286 stars 118 forks source link

Wrong reading when the MPU6050 is placed vertically #54

Closed Juno-cyber closed 1 year ago

Juno-cyber commented 1 year ago

I tried to initialize the mpu6050 when it was placed vertically, but the mpu6050 got wrong data. The error is that when I rotate the mpu6050, the angle change cannot correspond to my deflection. Is there a way to set the initialization to use the mpu6050 vertically?

I have been stuck with this problem for a long time. Thanks for anybody who can give me some advise.

xpeqex commented 1 year ago

Hi @Juno-cyber

Thank you for contacting us!

Most of the examples included in this repository have an auto calibrations routine that runs at the beginning of the code. Meaning that if you place your MPU6050 module in the initial position you need and run the code the values will be 0.

These are the examples that run this mentioned routine:

However, let me inform you that you may find some variations in the values because each module varies.

Lastly, you can always modify the code, changing the calibrations times, turning off the calibrations, and changing the offset values to get more accurate results.

Hope you find this information helpful. Have a nice day!

xpeqex commented 1 year ago

Hi @Juno-cyber Let us know if there is anything else we can assist you with or if we can consider this issue closed.

Juno-cyber commented 1 year ago

Thanks for your Enthusiastic help! Sorry I haven't replied for a long time after get your reply,I've get some inspiration but didn't get some time to try. Recently, I'm going to try it again.

PTT31 commented 11 months ago

hi Stm32f401rct6 and mpu6050 i was used imu_zero examples for set offset(Stm32f401rct6 and mpu6050), but it didn't stop after 30 minutes image help me!!

xpeqex commented 11 months ago

Hello @PTT31

It would be best if you opened a new GitHub issue to track this issue. This allows us to track the issue more easily and make sure that it gets the attention it deserves.

Here is some information we request you to include in your issue: