arduino程序,自动计算MPU6050的offset,显示如下:Sensorreadingswithoffsets:0016391-200Youroffsets:-1495-454236958-3631Dataisprintedas:acelXacelYacelZgiroXgiroYgiroZCheckthatyoursensorreadingsarecloseto0016384000Ifcalibrationwassuccesfulwritedownyouroffsetssoyoucansettheminyourprojectsusingsomethingsimilartompu.setXAccelOffset(youroffset)简单快速,把该偏移带入mpu6050替换下面的值://supplyyourowngyrooffsetshere,scaledforminsensitivitympu.setXAccelOffset(-1495);mpu.setYAccelOffset(-454);mpu.setZAccelOffset(2369);mpu.setXGyroOffset(58);mpu.setYGyroOffset(-36);mpu.setZGyroOffset(31);//1688factorydefaultformytestchip。
1