June 2018
Beginner to intermediate
280 pages
6h 58m
English
This code is used to read the raw value from MPU 6050 to Launchpad. It uses an MPU 6050 third-party library compatible with Energia IDE. The following are the explanations of each block of the code.
In this first section of code, we include the necessary headers for interfacing MPU 6050 to Launchpad, such as 12C, Wire and the MPU6050 library, and create an object of MPU6050 with the name accelgyro. The MPU6050.h library contains a class named MPU6050 to send and receive data to and from the sensor:
#include "Wire.h" #include "I2Cdev.h" #include "MPU6050.h" MPU6050 accelgyro;
In the following section, we start the I2C and serial communication to communicate with MPU 6050 and print sensor values through the serial ...