# Mpu6050-calibrate not working

**URL:** <https://forum.xod.io/t/mpu6050-calibrate-not-working/3037>\
**Category:** Uncategorized\
**Created:** [December 8, 2019, 12:48pm UTC](https://forum.xod.io/t/mpu6050-calibrate-not-working/3037 "2019-12-08T12:48:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysanchez](https://avatars.discourse-cdn.com/v4/letter/y/ecb155/32.png) [@ysanchez](https://forum.xod.io/u/ysanchez)\
**Post date:** [December 8, 2019, 12:48pm UTC](https://forum.xod.io/t/mpu6050-calibrate-not-working/3037/1 "2019-12-08T12:48:06Z")

</div>

Hi, I tried following this tutorial for a self-balancing Mbot [https://medium.com/xodlang/xod-and-pid-powered-self-balancing-mbot-6c420600271e](https://medium.com/xodlang/xod-and-pid-powered-self-balancing-mbot-6c420600271e) and although I can get the values of the watch I connected to the mpu6050-yrp-linear-accel ROLL, I cannot get these watch values when I try the mpu6050-calibrate. I read to try with deter or clock, even deploying the program and switching off the Mbot, then on again. But when I do this I only get the constant value 0.00.

Does anyone know how to fix this? I am using the same Mbot type, as well as the same sensor.  
I tried to follow the tutorial without that step, but if I do that the Mbot does not self-balance, so I think it might be a necessary step.

---

<div class="post-metadata">

**Author:** ![gabbapeople](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/gabbapeople/32/1517_2.png) [@gabbapeople](https://forum.xod.io/u/gabbapeople)\
**Post date:** [December 9, 2019, 3:28pm UTC](https://forum.xod.io/t/mpu6050-calibrate-not-working/3037/2 "2019-12-09T15:28:11Z")

</div>

hi! [ysanchez](https://forum.xod.io/u/ysanchez)  
Indeed, this library is old and it should be thoroughly reworked for the last XOD versions.

I promise to fix all the nodes as soon as I have time. But by now I’ve modified the calibration patch to solve your problem.  
Checkout the new calibration one, it should work for the Mbot robot.

 ![2](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/7/7a78e397f2608e16ae633e866015f62329bef975.png)  
I remind you the key points:

- Install your IMU module horizontally.
- Upload the calibration patch using debug mode.
- The calibration process can be observed in the XOD console.
- Do not touch and move the sensor until the calibration process is complete.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [December 11, 2019, 9:31pm UTC](https://forum.xod.io/t/mpu6050-calibrate-not-working/3037/3 "2019-12-11T21:31:14Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
