No response from MPU 6050 + Arduino MEGA2560

Howdy,

I've tried to trouble shoot my problem and have been using this thread as a reference: http://forum.arduino.cc/index.php?topic=257658.0

However I am still having issues with getting a read from the sensor. I currently have:

VCC -> 5V GND -> GND SCL -> D21 (SCL) SDA -> D20 (SDA) AD0 -> GND INT -> D2

I've downloaded and put the two files into:

Program files(x86)/Arduino/Libraries

And ran the MPU6050.raw file in the examples section but getting just a list of 0's. Any other things I could check out?

Also as a side note what's a good way to connect the arduino to the sensor wire wise? I'm just using the included header and attaching MtF wires, Male on the Arduino and Female to the header pins. But the connection is kind of shaky and it commonly comes loose.

Figured it out based on:

Ran the scanner and it kept saying the device was being found at 0x68. I assumed that it was the default location but I guess it wasn’t so I just edited the one line in the raw file to:
MPU6050 accelgyro(0x68);

And it began to read all the values perfectly. So it seems it was a issue of trying to get data from the wrong register.

In any case, how does everyone else secure their sensors? I’m kind having to hold mines since the wires aren’t snug or anything.