Find here working Arduino sketch for MPU-6000 / ArduIMU+ V3 using Digital Motion Processor (DMP)

Maybe you are interested in my Arduino sketch specifically written for the MPU-6000 on the ArduIMU+ V3 board from 3DRobotics Inc. It is attached to this post (v053_MPU6000_DMP6_SPI.ino). Please read the header carefully because it contains a lot of useful information.My sketch is based on Jeff Rowberg's MPU6050_DMP6_I2C sketch which makes use of the Digital Motion Processor to obtain the quaternion values from the MPU, and from there derives roll, pitch and yaw without almost any drift. My sketch is a translation of Jeff's sketch and also uses the DMP, but makes use of the SPI protocol i.s.o. the I2C protocol for transferring data (on ArduIMU+ V3 "MPU-6000 uses SPI for max performance"). My sketch works perfectly with the Teapot demo also from Jeff, I only corrected the axis ((Teapot_ArduIMU_V3.pde - attached). Please let me know if you like it. It took me a little over 100 hours to write and test it.

Views: 21610

Attachments:

Reply to This

Replies to This Discussion

For the APM with the ATMEGA2560 also be sure the change it to use INT6 in the attach interrupt. It seems to compile just fine that way with the stock Arduino IDE.

// attachInterrupt(interrupt, function, mode) specifies a function to call when an external interrupt occurs
// ArduIMU+ V3 has ATMEGA328 INT0 / D2 pin 32 (input) connected to MPU-6000 INT pin 12 (output) - Different for the ATMEGA2560
    attachInterrupt(6, dmpDataReady, RISING); // the 6 points correctly to INT6 / PE3
// -> if there is an interrupt from MPU-6000 to ATMEGA328, boolean mpuInterrupt will be made true

So what's the verdict?

Is everyone finally convinced that the DMP is a scam?

I wouldn't dare to say... Why do you think it is a scam?

Just an FYI - https://github.com/tsimon57/I2CdevSPI



Tom said:

For the APM with the ATMEGA2560 also be sure the change it to use INT6 in the attach interrupt. It seems to compile just fine that way with the stock Arduino IDE.

// attachInterrupt(interrupt, function, mode) specifies a function to call when an external interrupt occurs
// ArduIMU+ V3 has ATMEGA328 INT0 / D2 pin 32 (input) connected to MPU-6000 INT pin 12 (output) - Different for the ATMEGA2560
    attachInterrupt(6, dmpDataReady, RISING); // the 6 points correctly to INT6 / PE3
// -> if there is an interrupt from MPU-6000 to ATMEGA328, boolean mpuInterrupt will be made true

Reply to Discussion

RSS

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service