Before diving into the software part, let's assemble our hardware kits .
What is an MPU-6050 sensor
The MPU-6050 devices combine a 3-axis gyroscope and a 3-axis accelerometer on the same silicon die, together with an onboard Digital Motion Processor (DMP), which processes complex 6-axis MotionFusion algorithms. So, now you will be able to decipher the meaning of 6DOF- 6 degrees of freedom.
The MPU-6050 devices combine a 3-axis gyroscope and a 3-axis accelerometer on the same silicon die, together with an onboard Digital Motion Processor (DMP), which processes complex 6-axis MotionFusion algorithms. So, now you will be able to decipher the meaning of 6DOF- 6 degrees of freedom.
"These MotionTracking devices are designed for the low power,low cost, and high-performance requirements of smartphones,tablets and wearable sensors."
For the details about the connection schematic and hardware setup, kindly refer to my previous blog.
Figure 1: Blog Screenshot
Hope you've successfully interfaced the hardware components from the tutorial. Kudos! You are already half way through.
Now, let's come to the processing software, which will facilitate the 3D visualization of this motion sensor.
Software required
Considering that you already have installed ArduinoIDE involving two separate IDEs might make you feel a bit confused. Well, there's no need to panic. Follow the steps below and all your doubts will be cleared up!
Processing is quite similar to Arduino IDE except for a few specialized functions. So, you'll see an influence/similarity in ProcessingIDE.
Figure 2 and Figure 3 will make my statements clear.
Figure 2: Arduino IDE
Figure 3: Processing IDE (v2.2.1)
So, we see that there's a stunning visual similarity in both these IDEs.
Now that you've installed the Processing IDE, you need to download a special library named "Toxi" for processing purpose. Locating a "Toxi" file can be very hectic on the world wide web. So, I've made it easier for you by uploading it to my github. Click on this link and download the file named “toxiclibs-complete-0020”. Next, extract the folder . Copy the "toxiclibs-complete-0020" folder and paste it under the "libraries" folder of Processing.
Cant find "libraries folder"? then, make one! yeah. if you can't find a "libraries" folder, make a folder and name it as "libraries". Now, paste your "toxiclibs-complete-0020" folder inside it.
Having followed these steps properly, run the Processing IDE. Time to code!
In order to visualise the 3D visualization , you need to first upload the Arduino code for MPU-6050 (Extract the .ino file from MPU6050_DMP6.rar folder). After having done so, you need to make certain alterations as below.
You need to comment this code which says:
Now that you've installed the Processing IDE, you need to download a special library named "Toxi" for processing purpose. Locating a "Toxi" file can be very hectic on the world wide web. So, I've made it easier for you by uploading it to my github. Click on this link and download the file named “toxiclibs-complete-0020”. Next, extract the folder . Copy the "toxiclibs-complete-0020" folder and paste it under the "libraries" folder of Processing.
Cant find "libraries folder"? then, make one! yeah. if you can't find a "libraries" folder, make a folder and name it as "libraries". Now, paste your "toxiclibs-complete-0020" folder inside it.
Having followed these steps properly, run the Processing IDE. Time to code!
In order to visualise the 3D visualization , you need to first upload the Arduino code for MPU-6050 (Extract the .ino file from MPU6050_DMP6.rar folder). After having done so, you need to make certain alterations as below.
You need to comment this code which says:

Nithin MPosted Sep 8, 2017, 8:36 AM
Can you explain me ,how can we change teapod into our required 3d object.
Fernando AlvesPosted Mar 26, 2017, 10:52 AM
DevStatus = mpu.dmpInitialize(); erro copila??o
Kumaresh RajalingamPosted Mar 23, 2016, 9:18 PM
Nice one
Debasis SahaPosted Mar 21, 2016, 4:04 AM
Good One..
Kashif SohailPosted Mar 20, 2016, 11:47 AM
Nice Article
Saillesh PawarPosted Mar 20, 2016, 10:34 AM
Nice share
Vignesh ManiPosted Mar 20, 2016, 10:32 AM
Good