I am trying to read an accelerometer, I downloaded this libraries, but I got an error: exit status 1, compiling error. I tried other programming codes and it works fine, so it can't be a device problem.
If someone knows any solution make me know please. Thanks!
#include <I2Cdev.h>
#include <MPU6050.h>
#include <Wire.h>
int ax, ay, az;
int gx, gy, gz;
void setup() {
Serial.begin(57600); //Iniciando puerto serial
Wire.begin(); //Iniciando I2C
acel.initialize(); //Iniciando el sensor
if (acel.testConnection())
Serial.println("Sensor iniciado correctamente");
else
Serial.println("Error al iniciar el sensor");
}
void loop() {
// Leer las aceleraciones y velocidades angulares
acel.getAcceleration(&ax, &ay, &az);
acel.getRotation(&gx, &gy, &gz);
//Mostrar las lecturas separadas por un [tab]
Serial.print("aceleración[x y z] ángulo[x y z]:\t");
Serial.print(ax); Serial.print("\t");
Serial.print(ay); Serial.print("\t");
Serial.print(az); Serial.print("\t");
Serial.print(gx); Serial.print("\t");
Serial.print(gy); Serial.print("\t");
Serial.println(gz);
delay(100);
}