MPU 6050 / Gy-521 - Help (solved)

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

How can I get the value from the gyro ?

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

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

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.

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 :package:

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.

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 ?