MPU-6050 IMU appears to work in I2C scan, but does not connect lib properly

I want to start by saying I've never made a forum post before, so I'm sorry if I mess anything up.

I have been working on the same problem with my new MPU-6050 unit for several hours, and I have not found any online solutions that address my problem. I am using the GY-521 module, with a knockoff Arduino Nano that has worked well in the past. The GY-521 has a built-in voltage regulator, so it should be able to take 5V, but I also tried it with 3.3.

The specific issue that I am having is that the MPU-6050 shows up when I run an I2C scan (the one found here), but the library I'm using (found here) has trouble connecting properly.

When I run the scanner, I get the message:

Scanning...
I2C device found at address 0x68 !
done

Which is exactly what I would expect to see.

However, when I try to run the DMP6 example sketch from the library, I get:

Initializing I2C devices...
Testing device connections...
MPU6050 connection failed

Send any character to begin DMP programming and demo:

Now, when I run the "raw" sketch from the same library, I get output that looks valid to me. When I rotate the sensor in the x direction, the corresponding value changes in the way that I expect. However, I would like to use code that gives me more useful output while also offloading from my Arduino's processing, so I want to use the DMP code. Also, the same "MPU6050 connection failed" message appears for the raw sketch too. I tried inputting a character at the prompt for the DMP sketch, but then it gets hung up on:

Resetting memory bank selection to 0...

******* etc.

The AD0 pin is grounded, so it makes sense that the address is 0x68, which I believe is the default in the MPU-6050 library. SDA goes to A4 and SCL goes to A5. I tried tying the INT pin to D2 as suggested, to no avail, and I tried adding 10K pull-up resistors to SDA and SCL, with no effect.

I would very much appreciate any insights you might have. I can post my wiring if you think it's needed, although the fact that it showed up on the I2C scanner makes me think it isn't. Thanks!

The testConnection() routine reads out the device ID. Check what your chips returns. If it returns a value other than 0x34 you might have got a Chinese fake chip.

Try a different library. There are several.