#include <Wire.h>
#include <MPU6050.h>
#include <SD.h>
#include <SPI.h>
MPU6050 mpu;
int16_t ax, ay, az;
int16_t gx, gy, gz;
File myFile;
int pinoSS = 10;
void setup() {
Wire.begin();
mpu.initialize();
Serial.begin(9600);
while (!Serial);
pinMode(pinoSS, OUTPUT);
}
void loop() {
mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
Serial.print("Acelerometro: ");
Serial.print(ax);
Serial.print(", ");
Serial.print(ay);
Serial.print(", ");
Serial.print(az);
Serial.print(" | Giroscopio: ");
Serial.print(gx);
Serial.print(", ");
Serial.print(gy);
Serial.print(", ");
Serial.println(gz);
delay(1000);
}