Add an MPU6050 Accelerometer to your Arduino Project

In this video lesson we will show you how to incorporate accelerometers into your Arduino projects. Your Sunfounder kit includes the GY-87 IMU module. This module contains a BMP180 pressure sensor, which we have already used in earlier lessons, and an MPU6050 6 axis IMU. The MPU6050 includes 3 accelerometers and 3 gyros. In today’s lesson, we learn how to use the MPU6050 accelerometers. I will explain how these MEMS bases accelerometers work, and how we can use them in our project.

This is the schematic we use in todays lesson.

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

For your convenience, the code developed in the lesson is presented below: