I have been using Krodal's code to read etc my GY-521 gyro/accelerometer. My problem is I cannot figure out how to make it 16g fullscale. I realise it is probably only one line of code relating to one register, if anyone knows how to do it could they please enlighten me.
see page 13
http://www.invensense.com/mems/gyro/documents/PS-MPU-6000A-00v3.4.pdf
search your code for hints
Thanks Ny, I do have a copy of the datasheet & Krodals code, I know the register where the setting has to be made & I know what it has to be set to, however my knowledge of C is very limited and I just can't get the line of code right.
Thanks for trying.
I find this - with ref to a well documented library
http://playground.arduino.cc/Main/MPU-6050#.Uw8-k4XvjYR
think i just found the answer to my problem ( Changing acceleration settings on gy-521 using the MPU-6050 ) i'll let you know if it works.
Sput'
Hello Ny, just to let you know I tried the first line of code that I found in the other part of this forum. It works!
The only problem I have now is that each time my project is de-powered & powered up again it reverts to the default 2g until the sketch is uploaded again.
Fingers crossed - I think I've fixed that problem by moving the line of code (to set it to 16g) to a position immediately following the line that wakes it up.
MPU6050_write_reg (MPU6050_PWR_MGMT_1, 0);
MPU6050_write_reg (MPU6050_ACCEL_CONFIG, MPU6050_AFS_SEL_16G);
Sput'