//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Lectura de datos de la IMU MPU-6050
// Cรกlculo de รกngulos de inclinaciรณn
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Incluimos algunas librerรญas adicionales que vamos a utilizar
include < Wire.h > // Librerรญa para protocolo I2C
// ALGUNAS DEFINICIONES
#define IMU_ADDRESS 0x68 //Direccion I2C de la IMU
// Variables IMU
int acc[3];
int gyro[3];
int temperature;
float rawX, rawY, rawZ;
float X, Y, Z;
float gyroX, gyroY, gyroZ;
float gx_rate, gy_rate, gz_rate;
float last_gx_rate, last_gy_rate, last_gz_rate;
float rollrad, pitchrad;