Skip to content

Commit 2c738ae

Browse files
authored
Merge pull request #705 from mjcross/patch-1
Show how to use calibration data
2 parents 6970b0b + 4cd868f commit 2c738ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

RP2040/MPU6050/examples/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ Also, if the libraries files (I2Cdev.h, I2Cdev.cpp, MPU6050.h, MPU6050.cpp, MPU6
88
4. ```make```
99
5. Copy the uf2 file to your Pico board, using ```cp``` or the file explorer you have.
1010
6. ```sudo minicom -D /dev/ttyACM0``` to watch the serial output. Use ```sudo```, otherwise minicom will fail to open the device and show no warnings. On Windows you can use PuTTY, choosing the COM port that was assigned (check the Device Manager) and a baudrate of 115200.
11+
12+
#### Sensor calibration
13+
You will get better results if you measure the gyro and accelerometer offsets for your sensor *(e.g. with the accompanying calibration example)*. Set the initial offsets using `mpu.setXAccelOffset()` and friends in mpu6050_DMP_port.cpp after the call to `mpu.dmpInitialize()`.
14+
15+
Alternatively you could call `mpu.CalibrateAccel(6)` and `mpu.CalibrateGyro(6)` in the same location (6 loops should be enough).

0 commit comments

Comments
 (0)