he probado con el mega, due y uno, version del ide 1.8.2 el codigo a cargar es etste de adafruit mpu6050
// Demo for getting individual unified sensor data from the MPU6050
#include <Adafruit_MPU6050.h>
Adafruit_MPU6050 mpu;
Adafruit_Sensor *mpu_temp, *mpu_accel, *mpu_gyro;
void setup(void) {
Serial.begin(115200);
while (!Serial)
delay(10); // will pause Zero, Leonardo, etc until serial console opens
Serial.println("Adafruit MPU6050 test!");
if (!mpu.begin()) {
Serial.println("Failed to find MPU6050 chip");
while (1) {
delay(10);
}
}
Serial.println("MPU6050 Found!");
mpu_temp = mpu.getTemperatureSensor();
mpu_temp->printSensorDetails();
mpu_accel = mpu.getAccelerometerSensor();
mpu_accel->printSensorDetails();
mpu_gyro = mpu.getGyroSensor();
mpu_gyro->printSensorDetails();
}
void loop() {
// /* Get a new normalized sensor event */
sensors_event_t accel;
sensors_event_t gyro;
sensors_event_t temp;
mpu_temp->getEvent(&temp);
mpu_accel->getEvent(&accel);
mpu_gyro->getEvent(&gyro);
Serial.print("\t\tTemperature ");
Serial.print(temp.temperature);
Serial.println(" deg C");
/* Display the results (acceleration is measured in m/s^2) */
Serial.print("\t\tAccel X: ");
Serial.print(accel.acceleration.x);
Serial.print(" \tY: ");
Serial.print(accel.acceleration.y);
Serial.print(" \tZ: ");
Serial.print(accel.acceleration.z);
Serial.println(" m/s^2 ");
/* Display the results (rotation is measured in rad/s) */
Serial.print("\t\tGyro X: ");
Serial.print(gyro.gyro.x);
Serial.print(" \tY: ");
Serial.print(gyro.gyro.y);
Serial.print(" \tZ: ");
Serial.print(gyro.gyro.z);
Serial.println(" radians/s ");
Serial.println();
delay(100);
/* serial plotter friendly format
Serial.print(temp.temperature);
Serial.print(",");
Serial.print(accel.acceleration.x);
Serial.print(","); Serial.print(accel.acceleration.y);
Serial.print(","); Serial.print(accel.acceleration.z);
Serial.print(",");
Serial.print(gyro.gyro.x);
Serial.print(","); Serial.print(gyro.gyro.y);
Serial.print(","); Serial.print(gyro.gyro.z);
Serial.println();
delay(10);
*/
}
y este el error
Arduino:1.8.12 (Windows 10), Tarjeta:"Arduino Uno"
El Sketch usa 11964 bytes (37%) del espacio de almacenamiento de programa. El máximo es 32256 bytes.
Las variables Globales usan 705 bytes (34%) de la memoria dinámica, dejando 1343 bytes para las variables locales. El máximo es 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
Ha ocurrido un error mientras se enviaba el sketch
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Este informe podría contener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.