Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kkpoon/calibratempu6050
Calibrate MPU6050 procedure
https://github.com/kkpoon/calibratempu6050
arduino mpu6050
Last synced: 24 days ago
JSON representation
Calibrate MPU6050 procedure
- Host: GitHub
- URL: https://github.com/kkpoon/calibratempu6050
- Owner: kkpoon
- License: mit
- Created: 2014-01-13T09:06:04.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-07-10T23:28:43.000Z (over 5 years ago)
- Last Synced: 2023-08-06T09:10:47.434Z (over 1 year ago)
- Topics: arduino, mpu6050
- Language: C++
- Size: 168 KB
- Stars: 24
- Watchers: 6
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CalibrateMPU6050
================Calibrate MPU6050 procedure
Setup
-----1. Copy the folders from libraries/ to your Arduino IDE workspace libraries folder
2. Compile and Run in Arduino IDEHow to use
----------* For the first 180 seconds, the Calibration procedure is in WARM-UP mode.
* After 180 seconds, the procedure adjusts the offset value to satisfy the sensor reading to expected value.
* By observing the offset values, the mean of sensor readings and the standard deviation in Serial Monitor, pick the offset values when they become stable.
* Use the offset value in your program as below:```arduino
#include "I2Cdev.h"
#include "MPU6050.h"
#include "Wire.h"#define MPU6050_ACCEL_OFFSET_X -773
#define MPU6050_ACCEL_OFFSET_Y 3278
#define MPU6050_ACCEL_OFFSET_Z 1660
#define MPU6050_GYRO_OFFSET_X -24
#define MPU6050_GYRO_OFFSET_Y -62
#define MPU6050_GYRO_OFFSET_Z -6
MPU6050 mpu;
void setup() {
Wire.begin();
mpu.initialize();
mpu.setXAccelOffset(MPU6050_ACCEL_OFFSET_X);
mpu.setYAccelOffset(MPU6050_ACCEL_OFFSET_Y);
mpu.setZAccelOffset(MPU6050_ACCEL_OFFSET_Z);
mpu.setXGyroOffset(MPU6050_GYRO_OFFSET_X);
mpu.setYGyroOffset(MPU6050_GYRO_OFFSET_Y);
mpu.setZGyroOffset(MPU6050_GYRO_OFFSET_Z);
}
void loop() {
}
```