How to read data from mpu6050?

So I have connected Mpu6050 sensor using I2C breakout board and want to read data from it
using i2cdetect -r 0 does show something

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: 70 – – – – – – –

but I am lost about what to do next

I have tried code from https://www.raspberrypi.org/forums/viewtopic.php?t=22266
but it gives out no such device or address error.

Am I doing something incorrectly? Is there any better way to do this?

Is device connected to i2c bus 0? Is the address 0x70?

I think so, but is there a way to be sure?

Er… unplug it and run the detect again :wink:

yeah it gives out the same output

mpu6050 has an i2c address of 0x68 or 0x69, depending on how you configure it.

Scan all of the i2c busses to see if you can find it. Just because something is numbered “0” in the kernel does not mean that its numbered “0” on the pinout diagram.

I have personally found that mpu6050 and related devices (mpu6500, 9250, etc.) are extremely finnicky. Even if the data on the wire looks perfect, sometimes they just don’t work, switch it to a different device (I.e. SBC, MCU), and it magically works.