I recently purchased a Breakout Board GY-521 which has a MPU-6050 (accelerometer/gyroscope) chip. I found the following YouTube video and sample code very helpful.
As per your suggestion I've posted a question on his YouTube video. There is no library used here aside from the Wire library. It's interesting though that any code you dig up on communicating with this board does exactly the same thing. Either everyone is copying one another or there is a specific reason for the use of 'long'.
As per your suggestion I've posted a question on his YouTube video. There is no library used here aside from the Wire library. It's interesting though that any code you dig up on communicating with this board does exactly the same thing. Either everyone is copying one another or there is a specific reason for the use of 'long'.
Cheers
Jase
It looks like they are being safe using 2 extra bytes that are not needed. Change it to int and you should be fine.
From a library specifically designed to access all the mpu6050 values only 16bit int's are returned