Hello,
I am just starting to work with arduino. I have a Mega2560 and a GY-521 board and some problems.
So after some research first I ran an I2C scanner and found the MPU on the 0x68 adress.
My gy-521 is connected this way:
VCC ---- 5V
GND ---- GND
SCL --- SCL
SDA ---- SDA
I don't know if I should connect the INT pin to "2" pin on arduino. I have tried this code with INT both connected and disconnected, it gives the same result.
I used the code from arduino playground. This one.. And I am getting the same 2 reading over and over again, with 2 errors on the beginning.
I don't know the code well enough to identify these errors, could you give me a hand?
These are the readings. After the first two readings, it just continues repeating those two readings.
Any idea what "who_am_i: a4, error = 2....pwr_mgmt_1 : a4, error = 2" is and what I am doing wrong? Thank you!
who_am_i: a4, error = 2
pwr_mgmt_1 : a4, error = 2
MPU-6050
Read accel, temp and gyro, error = 2
accel x,y,z: 512, 2, 1023
temperature: 36.506 degrees Celsius
gyro x,y,z : 5376, 0, 4593,
MPU-6050
Read accel, temp and gyro, error = 2
accel x,y,z: 2, 512, -253
temperature: 36.506 degrees Celsius
gyro x,y,z : 21, 0, -3823
MPU-6050
Read accel, temp and gyro, error = 2
accel x,y,z: 512, 2, 1023
temperature: 36.506 degrees Celsius
gyro x,y,z : 5376, 0, 4593,
MPU-6050
Read accel, temp and gyro, error = 2
accel x,y,z: 2, 512, -253
temperature: 36.506 degrees Celsius
gyro x,y,z : 21, 0, -3823
Or something like this on another try.
MPU-6050
Read accel, temp and gyro, error = 2
accel x,y,z: 2, 0, 2079
temperature: 36.506 degrees Celsius
gyro x,y,z : 0, 16384, 0,
MPU-6050
Read accel, temp and gyro, error = 2
accel x,y,z: 512, 0, 7944
temperature: 36.506 degrees Celsius
gyro x,y,z : 0, 64, 0,
MPU-6050
Read accel, temp and gyro, error = 2
accel x,y,z: 2, 0, 2079
temperature: 36.506 degrees Celsius
gyro x,y,z : 0, 16384, 0,
MPU-6050
Read accel, temp and gyro, error = 2
accel x,y,z: 512, 0, 7944
temperature: 36.506 degrees Celsius
gyro x,y,z : 0, 64, 0,