Jump to content
I2Cdevlib Forums

MPU-6050 library &datasheet problems

Recommended Posts

I am really a newbie about this sensor.
I use the library MPU6050 written by  Jeff Rowberg, the header file defines the registers' address from 0x00 to 0x75, but the datasheet shows the address not continuously from 0x00 to 0x75, for example I want to know how does the function setXGyroOffset() work, and it says the register RA_YG_OFFS_USRH 's address is 0x15,but I cant find this register from the datasheet.

Second problem is the  packetSize = mpu.dmpGetFIFOPacketSize() from the example of MPU6050_DMP6,
it says the default is 42bytes,but I cant find any information from the datasheet about the packetsize,could any one explain this? 

Really appreciate .

Link to comment
Share on other sites

Hi yangkai,


First of all thanks for starting this discussion as i am new to mpu6050. I am also facing similar problem as you have described.

I would like to add some more point to that question.


1. According to the MPU6050 Register Map and Description document version 4.0. Several register are either Read only or Write only.

        For Example :    Register 117 – Who Am I ( Reg Address : 0x75) Read only.

    But in Library their are both get and Set function available.

        For Example :   void MPU6050::setDeviceID(uint8_t id); and uint8_t MPU6050::getDeviceID();


Question is if the register is Read only then why their is set function available in Lib??

Link to comment
Share on other sites

Hi Vivek,


wow ,I didnt notice that before.


But after few hours , I find the datasheet of the MPU-6500, and it has the addresses the library defines,but not all of them are the same registers as library defines.

So, keep going  , thank you for your reply.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...