DOF IMU, optional part for use in later builds?


Hi there, rants aside on the 6DOF IMU not being included - is this something that will be ‘optional’ in later builds or will be included. I say that as i believe one of the next builds will be a quadcopter which would surely require this to have any chance of working? Should leave it and wait for it in a later kit or buy one from amazon, either an identical one for £5

or £38

Just not sure what to do and looking for advice from a electronic/makers perspective and a comment/visibility of what the next few kits are going to consist of.

Optional Parts

I purchased and integrated this MPU6050 I got from (I am in Canada)

I have verified that the yaw, pitch and roll are totally correct, but it does seem to at least partially work. I am not sure what expect from MPU6050-test.ino. If I shake the cube, then the color will change if I rotate the cube, but I havent verified that accuracy of the MPU6050 unit.


While I can’t guarantee that a future kit won’t come with an IMU breakout, I can say with some certainty that there won’t be one within the next 3 kits.

The Adafruit breakout that you linked has a different chip on board (BNO055 vs the MPU6050), and though it looks like they both talk over the same protocol (i2c), I don’t know enough about the BNO055 to say whether it’s compatible with the code that @david has written for the MPU6050.


Where did you get the libraries for MPU6050 and I2Cdev ?


I got the libraries from the zip archive on See step 1 “Download zip archive of entire current repository snapshot”. I didnt follow the instructions on the website, it didnt work for me.

I then copied the folders Arduino\I2Cdev and Arduino\MPU6050 to my Arduino\libraries folder. I was doing this on windows. The exact command line commands would be:

mkdir c:\Users\User\Documents\Arduino\libraries\I2Cdev
copy d:\Downloads\jrowberg-i2cdevlib-0a027b4\Arduino\I2Cdev c:\Users\User\Documents\Arduino\libraries\I2Cdev\

Then repeat for the MPU6050.

I am using Arduino 1.8.0 IDE.

After doing this, I was able to compile and load the led_cube_imu_test. I wasnt able to do the calibration. I dont know if this is because I was using a Leonardo Arduino or if there was something wrong with the INT (interrupt) on my MPU6050. (On Leonardo SDA and SCL are pin 2/3, so I tried using pin 4 for INT.)


The code given in the Learning module has two ‘modes’, which I’ll call static and dynamic. The static mode should be enabled when the cube is sitting still, on a table or such. It will do the rainbow gradient pattern on its own, with no dependence on the MPU6050.

There’s a variable motionMeter that increments when it detects the average motion of the cube exceeds a certain threshold (in other words, when it senses enough disturbance, i.e. picked up and turned about). When it motionMeter exceeds a value (set to 500 by default), it will put the cube into dynamic mode, where it will change the color of each face of the cube based on the yaw, pitch, and roll. If set up correctly, each pair of opposite faces should change when you rotate the cube about their common axis. The variable will decrement any time it does not sense enough motion.

The MPU6050 should be very accurate from its starting position, given the calibration offsets are set correctly (there’s code you can uncomment to calibrate), but feel free to verify this yourself! It’s pretty cool to see just how accurate the thing can be by looking at the post-processed outputs.


@yehowCow The calibrate function doesn’t seem to exist so I wasn’t able to use that either. I’m not sure what offsets to use.


I found the IMU_Zero example included in the MPU6050 folder, accessible here: File > Examples > MPU6050:

Running it will give some offsets for the individual MPU6050 you have, since apparently they are all different.