I think you have everything right. The connections are okay.
The dmp example set the baud rate to 115200. So you should use that also in the serial monitor. Or you could change the sketch and use the default 9600.
Can you attach the screenshot ?
Do you use a breadboard ? They cause many problems with bad connections.
Thanks for replying. I have tried changing the baud rates in both, the serial monitor and the sketch but no improvements. And just attached the image.
When you say i2c level shifter you mean the pull up resistors? I have a 10k ohm resistor between VCC and SDA and between SCL and VCC. Should I try other Resistor values?
And no, we are not in a breadboard.
Should I modify anything in the sketch in this part?
// 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
hello, I am now doing my FYP project. I am start using MPU6050 and I am not so familiar with programming. I have to research this by myself and I find the problem like this. I am using the same code.
May I know how you commented out and uncommented the original code.
Thanks.
In the file MPU6050_DMP6.ino
You see these blocks:
// uncomment "OUTPUT_READABLE_QUATERNION" if you want to see the actual
// quaternion components in a [w, x, y, z] format (not best for parsing
// on a remote host such as Processing or something though)
//#define OUTPUT_READABLE_QUATERNION
The define is not active, because it is commented out with the "//".
If your remove the "//" in front of the "#define", it is active and used by the compiler.
Run the i2c scanner, Arduino Playground - I2cScanner
See the sketch if the address is set properly (0x68 or 0x69).
Did you connect INT to Arduino pin 2 ?
Hello i`m having a problem reading data from the sensor, i get this message:
Initializing I2C devices...
Testing device connections...
MPU6050 connection failed
Send any character to begin DMP programming and demo:
the sensor is default InvenSense, 0x68 is his address which ive implemented like follows: MPU6050 mpu(0x68); in his code, ive done all the wire connections good, the i2c sacanner said it found the sensor at 0x68 address.
Please, help!
There seems to be a problem in the connection, perhaps a bad connection or wrong voltage or wrong pull-up resistors or very long wires.
Do you use a breadboard, they sometimes have bad contacts.
Which Arduino board are you using ?
Which sensor board do you have, and how have you connected it ? Vcc to 5V pin or 3.3V pin ?
yes ive used a breadboard in my experiments, but now ive some connectors and ill try again. As for the connection and voltages, it says here https://www.sparkfun.com/products/11028 that the voltage should be between 2.6 and 3.3V, im using a ArduinoUNO board and i supply the sensor with 3.3V included on the board. I must get this problem solved today, it can`t go on like this! Ow yea, and the supplyer said i should give 3.3V to the VIO pin aswell.. the i2c scanner detected it when i gave the 3.3V to the VIO pin, but not before that...
Thanx for the answer on such a short notice, as i said, today it must work!
If you have that Sparkfun board, you should power it with the 3.3V pin of the Arduino Uno.
For a board from Ebay it could be different.
If the I2C scanner found the address at 0x68, the I2C bus is working.
Thank you very much for your help! its working like a charm, i managed to see all the data types the imu can send, euler angles, quaterion, raw values. This is so exciting, cant wait to use it for my balancing robot project, do you have some nice references for me to look at? has someone done a balancing robot project with this imu?? or at least, which data type should i use? which is better, i`m working with Y axis for the acceleration and X axis for gyro Some pointers for a newbie please!