MPU 6050 Change output rate

I’m trying to build an Arduino due based flight controller and I’m using MPU 6050 as the IMU.
My flight controller should work at 400hz so I need the data from IMU at 400hz rate.
how can I reach this rate?

alireza_73: I'm trying to build an Arduino due based flight controller and I'm using MPU 6050 as the IMU. My flight controller should work at 400hz so I need the data from IMU at 400hz rate. how can I reach this rate?

Poll it 400 times a second and see if that gets you anywhere? Not sure what else you're looking for. Did you try to get a 400Hz sample rate? Not even sure if a 400Hz sample rate is possible with a 16MHz 8-bit Arduino lol.

more refresh rate means more stability during flight, some flight controllers work at 32khz speed! I am not using an Arduino uno.im using 84mhz 32-bit Arduino due.

alireza_73:
more refresh rate means more stability during flight

Meh. To a degree.

alireza_73:
im using 84mhz 32-bit Arduino due.

Gosh, that stupid thing (I own a Due). It’s fast and powerful, but it’s sheer hell to get working with communication standards like I2C and SPI. Have you at least got the MPU working with the Due? If so, how fast can you get it to poll?

Honestly, I think you’d be better off with a Mega. A 400Hz refresh rate is overkill for your flight controller and the Mega is much easier to use than the hunk of junk Due.

I am able to poll data from it using i2cdev lib.its compatible with due. https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050 I'll measure polling speed and post it.