Go Down

Topic: Using jrowberg MPU6050 library on external port of Makeblock MegaPi (Read 213 times) previous topic - next topic

JCH700

Hi All

I'm having trouble using the MPU6050_DMP6 example file under Arduino folder which can be found here:https://github.com/jrowberg/i2cdevlib.

Makeblock library can be found here: https://github.com/Makeblock-official/Makeblock-Libraries


Code: [Select]
#include "I2Cdev.h"
#include "MeMegaPi.h"
#include "MPU6050_6Axis_MotionApps20.h"
//#include "MPU6050.h" // not necessary if using MotionApps include file

// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation
// is used in I2Cdev.h
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
    #include "Wire.h"
#endif

// class default I2C address is 0x68
// specific I2C addresses may be passed as a parameter here
// AD0 low = 0x68 (default for SparkFun breakout and InvenSense evaluation board)
// AD0 high = 0x69
MPU6050 mpu(0x68);
//MPU6050 mpu(0x69); // <-- use for AD0 high


I tried using 0x69 and 0x68 but it still says connection failed. Please help.
Attached is the setup that I have.


Go Up