Problem reading data from GY-521 MPU-6050

HI,
I have the Arduino Uno R3 and I bought the GY-521: http://www.amazon.co.uk/gp/product/B008BOPN40/ref=ox_sc_act_title_3?ie=UTF8&psc=1&smid=A2R7ZFQTB2LT4

So after doing some research, i found a post that showed how to connect gy-521 to the Arduino:
Arduino +5V to VCC
Arduino GND to GND
Arduino analog input pin A4 to SDA
Arduino analog input pin A5 to SCL

Hello i`m having a problem reading data from the sensor, i get this message:

Initializing I2C devices…
Testing device connections…
MPU6050 connection successful
a/g: 0 0 0 0 0 0
a/g: 0 0 0 0 0 0
a/g: 0 0 0 0 0 0
a/g: 0 0 0 0 0 0
a/g: 0 0 0 0 0 0
a/g: 0 0 0 0 0 0

I was hoping someone could tell me what I am doing wrong.

Thanks!

You need pull-up resistors on both data pins. Does your circuit provide those?

Does the GY-521 need a 'start' message of some kind?

The way you connected it, is okay. For the 'dmp' example you should also connect 'INT' to Arduino digital pin 2.

Could you try this sketch to see if it produces the raw values ? http://playground.arduino.cc/Main/MPU-6050

If that fails, you should run the i2c_scanner. http://playground.arduino.cc/Main/I2cScanner

I assume you use the newest Arduino software (version 1.0.5) and the original new code from i2cdevlib. http://www.i2cdevlib.com/

Hi guys,
I’m having the same problem.
It works on the nano, but when i tried mega it doesn’t.
I’ve run the dmp example, and got this:
I have no idea was going on, can anyone help me?! Thanks!

Sem título.png

When I run the scanner, it give-me this:

I2C Scanner Scanning... No I2C devices found

Scanning... No I2C devices found

Oh! I figure out! I was wiring in A4 and A5 like in the nano or UNO, but in mega the SDA and SCL pins are 20 and 21... ;)

Brusnicki:
Oh! I figure out! I was wiring in A4 and A5 like in the nano or UNO, but in mega the SDA and SCL pins are 20 and 21…
:wink:

Are you writing your own sketch on the MPU-6050?