# MPU 6050 / Gy-521 - Help (solved)

**URL:** <https://forum.xod.io/t/mpu-6050-gy-521-help-solved/1822>\
**Category:** Uncategorized\
**Created:** [February 7, 2019, 2:01pm UTC](https://forum.xod.io/t/mpu-6050-gy-521-help-solved/1822 "2019-02-07T14:01:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanilord](https://avatars.discourse-cdn.com/v4/letter/v/71c47a/32.png) [@vanilord](https://forum.xod.io/u/vanilord)\
**Post date:** [February 7, 2019, 2:01pm UTC](https://forum.xod.io/t/mpu-6050-gy-521-help-solved/1822/1 "2019-02-07T14:01:18Z")

</div>

Solded : It works when I connect Int pin (Gy-521) to Pin D11, D12 (Arduino Mega). Thanks !

Weird it didn’t work with pin \< D10.  
/////

Hi everybody !

I’m trying to get the data from my MPU 6050 but I’m lost.

I tried to get data from all the pins : no result.  
I tried to use gabbapeople/mbot-lib library but since I don’t have mCore board, I can’t reproduce the steps of the tutorial [https://medium.com/xodlang/xod-and-pid-powered-self-balancing-mbot-6c420600271e](https://medium.com/xodlang/xod-and-pid-powered-self-balancing-mbot-6c420600271e)

How can I get the value from the gyro ?

---

<div class="post-metadata">

**Author:** ![vanilord](https://avatars.discourse-cdn.com/v4/letter/v/71c47a/32.png) [@vanilord](https://forum.xod.io/u/vanilord)\
**Post date:** [February 7, 2019, 9:31pm UTC](https://forum.xod.io/t/mpu-6050-gy-521-help-solved/1822/2 "2019-02-07T21:31:46Z")

</div>

Before I had no compilation issue but didn’t have any output.

Now I’m having a compilation error (only with this node) :

 ![compi](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/1314ec1ae38e9d49d8fb5f4e318d90114d322134.png)

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [February 7, 2019, 10:18pm UTC](https://forum.xod.io/t/mpu-6050-gy-521-help-solved/1822/3 "2019-02-07T22:18:37Z")

</div>

You need to enlarge the message window or scroll up so we can see what the compilation error is. If interface will let you copy the text, you can just paste it into the thread.

---

<div class="post-metadata">

**Author:** ![vanilord](https://avatars.discourse-cdn.com/v4/letter/v/71c47a/32.png) [@vanilord](https://forum.xod.io/u/vanilord)\
**Post date:** [February 8, 2019, 11:19am UTC](https://forum.xod.io/t/mpu-6050-gy-521-help-solved/1822/4 "2019-02-08T11:19:48Z")

</div>

I’ve done 2 complete fresh install and always get this error now.  
Here’s the full log :

Begin compiling code for the board Arduino/Genuino Mega or Mega 2560 📦

Using board ‘mega’ from platform in folder: C:\Users\Ori\xod\__packages_\_\packages\arduino\hardware\avr\1.6.23  
Using core ‘arduino’ from platform in folder: C:\Users\Ori\xod\__packages_\_\packages\arduino\hardware\avr\1.6.23

Detecting libraries used…

“C:\Users\Ori\xod\ **packages** \packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF\_CPU=16000000L -DARDUINO=10607 -DARDUINO\_AVR\_MEGA2560 -DARDUINO\_ARCH\_AVR “-IC:\Users\Ori\xod\ **packages** \packages\arduino\hardware\avr\1.6.23\cores\arduino” “-IC:\Users\Ori\xod\ **packages** \packages\arduino\hardware\avr\1.6.23\variants\mega” “C:\Users\Ori\AppData\Local\Temp\arduino-sketch-4980F1F9CD500CFEA405D533AFE2DFCC\sketch\xod\_1549624736694\_sketch.ino.cpp” -o nul

Alternatives for Wire.h: [Wire@1.0]  
ResolveLibrary(Wire.h)  
-\> candidates: [Wire@1.0]

“C:\Users\Ori\xod\ **packages** \packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF\_CPU=16000000L -DARDUINO=10607 -DARDUINO\_AVR\_MEGA2560 -DARDUINO\_ARCH\_AVR “-IC:\Users\Ori\xod\ **packages** \packages\arduino\hardware\avr\1.6.23\cores\arduino” “-IC:\Users\Ori\xod\ **packages** \packages\arduino\hardware\avr\1.6.23\variants\mega” “-IC:\Users\Ori\xod\ **packages** \packages\arduino\hardware\avr\1.6.23\libraries\Wire\src” “C:\Users\Ori\AppData\Local\Temp\arduino-sketch-4980F1F9CD500CFEA405D533AFE2DFCC\sketch\xod\_1549624736694\_sketch.ino.cpp” -o nul

Alternatives for I2Cdev.h: []  
ResolveLibrary(I2Cdev.h)  
-\> candidates: []

C:\Users\Ori\AppData\Local\Temp\xod\_temp\_sketchbookQ1Fc33\xod\_1549624736694\_sketch\xod\_1549624736694\_sketch.ino:1034:20: fatal error: I2Cdev.h: No such file or directory  
compilation terminated.

Multiple libraries were found for “Wire.h”  
Used: C:\Users\Ori\xod\__packages_\_\packages\arduino\hardware\avr\1.6.23\libraries\Wire

Using library Wire at version 1.0 in folder: C:\Users\Ori\xod\__packages_\_\packages\arduino\hardware\avr\1.6.23\libraries\Wire

Error: exit status 1  
Compilation failed.  
Compilation failed  
Command `C:\Users\Ori\AppData\Local\Programs\XOD IDE\resources\arduino-cli.exe --config-file=C:\Users\Ori\AppData\Local\Temp\arduino-cliCHYXc0\.cli-config.yml compile --fqbn arduino:avr:mega:cpu=atmega2560 --verbose C:\Users\Ori\AppData\Local\Temp\xod_temp_sketchbookQ1Fc33\xod_1549624736694_sketch` failed with code 1  
The generated C++ code contains errors. It can be due to a bad node implementation or if your board is not compatible with XOD runtime code. The original compiler error message is above. Fix C++ errors to continue. If you believe it is a bug, report the problem to XOD developers.

---

<div class="post-metadata">

**Author:** ![vanilord](https://avatars.discourse-cdn.com/v4/letter/v/71c47a/32.png) [@vanilord](https://forum.xod.io/u/vanilord)\
**Post date:** [February 8, 2019, 11:39am UTC](https://forum.xod.io/t/mpu-6050-gy-521-help-solved/1822/5 "2019-02-08T11:39:55Z")

</div>

This error seems to be fixed by copying `I2Cdev` and `MPU6050` to _ardulib_ folder. But i still have no output on the watch node.

EDIT : I’ve done some test and apparently, the `mpu6050-calibrate` node and the `mpu6050-yrp-linear-accel` node break XOD IDE. Nothing in the code works (test led does’t receive input, console log and watch nodes don’t work, …).

Any idee how to solve the problem ?
