Library for Mpu 6050 (gy-521)


Hello, can I use some node for mpu6050 (board gy521)? I try to use this , but it doesn’t work. I can’t find and do this step : “To add an Arduino library open the place where XOD is installed and copy the library folder to packages/xod-client-electron folder.” I think, now i have library (via gabbapeople/mbot-lib ) in my XOD, but I can’t upload it upload to arduino, there is some error. Can you help my please?
I will by very glad. Thx


Could you please describe the error that occurs during the upload in detail. Even better to attach the upload log with the error or to attach a screenshot.
Thank you.


I really don’t know what is wrong.


I’ve updated the mbot-lib =)
Ok, here are things for you to do:

  1. Make sure you have the latest IDE version, if it is not latest then update.

  2. Update the lib. Go to $HOME/xod/__lib__ and delete the gabbapeople/mbot-lib library. Add the new version 1.2.3 of the gabbapeople/mbot-lib using the XOD IDE client.

  3. Now you need to require a third-party Arduino-library, but at this moment requiring third-party libraries possible only from master branches of GitHub repositories
    Make a new project then a patch. Put the mpu6050-calibrate or the mpu6050-yrp-linear-accel node onto the patch and upload it.
    XOD will ask you to download two third-party libraries (PinChangeInt and i2cdevlib) to the workspace folder $HOME/xod/__ardulib__ . So, Download it.

  4. Go to the $HOME/xod/__ardulib__/i2cdevlib/Arduino folder.

  5. Move two Arduino libraries I2Cdev and MPU6050 from the
    $HOME/xod/__ardulib__/i2cdevlib/Arduino folder
    to the $HOME/xod/__ardulib__/ folder.

  6. Test your patch.

Pls reply if you succeeded or not.


Thank you, now it works great. It’s good information for others. My problem was, that i didn’t copy the I2Cdev and MPU6050 to ardulib.
I have another question: is it possible to use this library (mbot-lib) without Mbot board (I using A. UNO)? Just for reading the sensor? Because, primary I am looking for a way to use this sensor, for my project. Sorry if it’s stupid question, I am beginner :wink:


Mcore Board is almost analogy of Arduino Uno. So Yes, you can use Uno.

In this library, for the proper “MPU6050” node operation, it is better to use the INT pin.
A “gy521” board that you have has this pin, so don’t forget to attach it.
Also, calibrate the sensor before use as it is written in the article.


Great, now with INT it works perfectly. For calibrating I have used this (I hope, that it is correct):V%C3%BDst%C5%99i%C5%BEek