Using Arduino to Calculate Roll and Pitch from MPU6050 3-axis Accelerometers

In this video lesson we show you how to take the calibrated accelerometer data from the MPU6050 and use it to calculate the tilt of the board. We can calculate tilt in two axis, or the roll and the pitch. This is the schematic for the project:

MPU6050
Schematic for connecting the GY-87 module to the Arduino

This is the code we developed in the video to calculate the roll and pitch from the three axis accelerometer data.