microcontroller - Zero Values are received when i try to read the Gyro or Acc registers of MPU6050 IC -
i stuck @ strange behavior using mpu6050 module in project when read who_am_i register getting 0x68 value have disabled sleep when write of configuration registers & read correct data means i2c communication working fine
now problem when try read gyro or acc data getting 0 don't know went wrong can tell me reason ?
i reading sensor value using following code
gyrox.byte[1] = readbyte(mpu6050_ra_gyro_xout_l); //delay(); gyrox.byte[0] = readbyte(mpu6050_ra_gyro_xout_h); //delay(); gyroy.byte[0] = readbyte(mpu6050_ra_gyro_yout_h); //delay(); gyroy.byte[1] = readbyte(mpu6050_ra_gyro_yout_l); //delay(); gyroz.byte[0] = readbyte(mpu6050_ra_gyro_zout_h); //delay(); gyroz.byte[1] = readbyte(mpu6050_ra_gyro_zout_l); //delay(); accx.byte[0] = readbyte(mpu6050_ra_accel_xout_h); //delay(); accx.byte[1] = readbyte(mpu6050_ra_accel_xout_l); //delay(); accy.byte[0] = readbyte(mpu6050_ra_accel_yout_h); //delay(); accy.byte[1] = readbyte(mpu6050_ra_accel_yout_l); //delay(); accz.byte[0] = readbyte(mpu6050_ra_temp_out_h); //delay(); accz.byte[1] = readbyte(mpu6050_ra_temp_out_l); thanks folks
Comments
Post a Comment