I tried it manually and I can read the raw Gyro & Accelero raw outputs and the offsets.
Right now my problem seems to be that I can't do any changes by setting different values in the structure "Offset".
I don't know where the failure might be, maybe you can help me again.
Edit:
The problem was that I couldn't write into the register with the "writeWord." function from I2Cdev.cpp .
It has to be "WriteBits".
Nevertheless I have some questions about the registers.
Why did you chose your offset registers to be the "SELF_TEST_X_GYRO" (0x00) register?
And for the acceleration you have chosed for example the "XA_OFFSET_H" (0x06).
The "SELF_TEST_X_GYRO" (0x00) worked fine for me, but to change the value of the acceleration offset
I had to write into the XA_OFFSET_L (0x07) register.
Maybe you have some answers for me ;)
Bye
Hi all,
I've been trying to get the MPU6050 libsworking,and I've been having a lot of trouble. To start with, I simply imported this (http://mbed.org/users/garfieldsg/code/MPU6050/) library and tweaked it as required to work with the STM32. All that was really required were pin changes. My new program is here: http://mbed.org/users/chris1seto/code/mpu6050_test_basic_1/
Although the connection test passed, the getmotion6() call is returning all zeros no matter what. What's even more interesting is that even down to the i2c transaction in i2cdevlib's files, the call to i2c.read(devAddr<<1, redData, length); is returning all zeros.
I am sure that the MPU is wired correctly. It works just fine on the Arduino version of the libs. It does pass the i2c connection test and I used a scope to verify that some kind of data exchange was taking place.
Any ideas?