안녕하세요.
self balancing robot에 대한 소스코드에 대해 궁금한 점이 있어서 질문 드립니다.
매우 간단한거 같은데 저는 도저히 문제점이 무엇인지 잘 모르겠습니다..
먼저 회로에 사용된 부품입니다.
아두이노 UNO
DC motor x2
L298N DC motor Driver
MPU6050 Gyro Sensor
다음은 사용된 회로입니다.
사용된 코드
#include <PID_v1.h>
#include <LMotorController.h>
#include "I2Cdev.h"
#include "MPU6050_6Axis_MotionApps20.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif
//------------------------------------------------------------
#define OUTPUT_TEAPOT 1 // Processing을 통해 MPU6050 센서를 Visualize 하고 싶은 경우 1, 아니면 0으로 선언합니다
#define MIN_ABS_SPEED 30 // 모터의 최저속도를 설정합니다. 0 ~ 255 값 중 선택
#define OUTPUT_READABLE_YAWPITCHROLL // Yaw, Pitch, Roll 값을 얻기 위해 선언합니다
#define INTERRUPT_PIN 2 // MPU6050 센서의 INT 핀이 꽂혀있는 번호를 설정합니다. 보통 2번
#define LED_PIN 13 // Arudino Uno의 13번핀 LED를 동작 중에 반짝거리게 하려고 선언합니다
//------------------------------------------------------------
//MPU 객체를 선언합니다
MPU6050 mpu;
// MPU control/status vars
bool blinkState = false; // LED를 반짝거리게 하기 위한 변수
bool dmpReady = false; // set true if DMP init was successful
uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU
uint8_t devStatus; // return status after each device operation (0 = success, !0 = error)
uint16_t packetSize; // expected DMP packet size (default is 42 bytes)
uint16_t fifoCount; // count of all bytes currently in FIFO
uint8_t fifoBuffer[64]; // FIFO storage buffer
//------------------------------------------------------------
// MPU6050 센서를 통해 쿼터니언과 오일러각, Yaw, Pitch, Roll 값을 얻기 위해 선언합니다
// orientation/motion vars
Quaternion q; // [w, x, y, z] quaternion container
VectorInt16 aa; // [x, y, z] accel sensor measurements
VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements
VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements
VectorFloat gravity; // [x, y, z] gravity vector
float euler[3]; // [psi, theta, phi] Euler angle container
float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector
//------------------------------------------------------------
// Processing으로 MPU6050 센서를 Visualize 하기 위한 변수
// packet structure for InvenSense teapot demo
uint8_t teapotPacket[14] = { '$', 0x02, 0,0, 0,0, 0,0, 0,0, 0x00, 0x00, '\r', '\n' };
//------------------------------------------------------------
// PID 제어용 변수 선언
double kp = 60.;
double ki = 200.;
double kd = 1.5;
// 기울일 각도 선택
// 제가 만든 밸런싱로봇에는 184.0도가 가장 최적의 평형각도였습니다
// 각도가 180도를 기준으로 +-를 설정해주시면 됩니다
double originalSetpoint = 184.0;
double setpoint = originalSetpoint;
double movingAngleOffset = 0.3;
// PID 제어용 input, output 변수를 선언합니다
double input, output;
// PID값을 설정해준다
PID pid(&input, &output, &setpoint, kp, ki, kd, DIRECT);
// 모터 제어용 변수 선언
// EnA, EnB는 속도제어용(pwm), IN1,2,3,4는 방향제어용 핀입니다
int ENA = 10;
int IN1 = 12;
int IN2 = 6;
int IN3 = 9;
int IN4 = 8;
int ENB = 11;
// motorController 객체 생성, 맨 끝 파라미터 1,1은 각각 좌측, 우측모터의 최대속도(%) 입니다.
LMotorController motorController(ENA, IN1, IN2, ENB, IN3, IN4, 1, 1);
// ================================================================
// === INTERRUPT DETECTION ROUTINE ===
// ================================================================
volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high
void dmpDataReady() {
mpuInterrupt = true;
}
void setup(){
// join I2C bus (I2Cdev library doesn't do this automatically)
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
Wire.begin();
Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties
#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
Fastwire::setup(400, true);
#endif
Serial.begin(115200);
while (!Serial); // wait for Leonardo enumeration, others continue immediately
// initialize device
Serial.println(F("Initializing I2C devices..."));
mpu.initialize();
pinMode(INTERRUPT_PIN, INPUT);
// verify connection
Serial.println(F("Testing device connections..."));
Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed"));
// 키입력을 기다리는 코드. 주석처리했습니다
// wait for ready
//Serial.println(F("\nSend any character to begin DMP programming and demo: "));
//while (Serial.available() && Serial.read()); // empty buffer
//while (!Serial.available()); // wait for data
//while (Serial.available() && Serial.read()); // empty buffer again
// load and configure the DMP
Serial.println(F("Initializing DMP..."));
devStatus = mpu.dmpInitialize();
// supply your own gyro offsets here, scaled for min sensitivity
mpu.setXGyroOffset(220);
mpu.setYGyroOffset(76);
mpu.setZGyroOffset(-85);
mpu.setZAccelOffset(1788); // 1688 factory default for my test chip
// devStatus 값이 0 이면 정상작동, 0이 아니면 오작동입니다
// make sure it worked (returns 0 if so)
if (devStatus == 0){
// turn on the DMP, now that it's ready
Serial.println(F("Enabling DMP..."));
mpu.setDMPEnabled(true);
// enable Arduino interrupt detection
Serial.println(F("Enabling interrupt detection (Arduino external interrupt 0)..."));
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING);
mpuIntStatus = mpu.getIntStatus();
// set our DMP Ready flag so the main loop() function knows it's okay to use it
Serial.println(F("DMP ready! Waiting for first interrupt..."));
dmpReady = true;
// get expected DMP packet size for later comparison
packetSize = mpu.dmpGetFIFOPacketSize();
// MPU6050 센서가 정삭작동하면 PID 제어용 코드를 초기화합니다
pid.SetMode(AUTOMATIC);
pid.SetSampleTime(10);
pid.SetOutputLimits(-255, 255);
}
else{ // MPU6050 센서가 오작동한 경우
// ERROR!
// 1 = initial memory load failed
// 2 = DMP configuration updates failed
// (if it's going to break, usually the code will be 1)
Serial.print(F("DMP Initialization failed (code "));
Serial.print(devStatus);
Serial.println(F(")"));
}
// 로봇이 작동 중 13번 LED를 깜빡거리기 위해 OUTPUT으로 초기화합니다
pinMode(LED_PIN, OUTPUT);
}
void loop(){
// if programming failed, don't try to do anything
if (!dmpReady) return;
// wait for MPU interrupt or extra packet(s) available
while (!mpuInterrupt && fifoCount < packetSize){
//no mpu data - performing PID calculations and output to motors
pid.Compute(); // 루프를 돌면서 pid 값을 업데이트합니다
motorController.move(output, MIN_ABS_SPEED); // pid 연산으로 나온 output 값을 motorController로 전송합니다. (모터제어)
}
// reset interrupt flag and get INT_STATUS byte
mpuInterrupt = false;
mpuIntStatus = mpu.getIntStatus();
// get current FIFO count
fifoCount = mpu.getFIFOCount();
// MPU6050 센서가 정상작동하는 경우에만 PID제어를 해야하므로 아래와 같이 if-else문을 작성합니다
// check for overflow (this should never happen unless our code is too inefficient)
if ((mpuIntStatus & 0x10) || fifoCount == 1024){
// reset so we can continue cleanly
mpu.resetFIFO();
Serial.println(F("FIFO overflow!"));
}
// MPU6050 센서가 정상작동하는 경우
else if (mpuIntStatus & 0x02){
// wait for correct available data length, should be a VERY short wait
while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount();
// read a packet from FIFO
mpu.getFIFOBytes(fifoBuffer, packetSize);
// track FIFO count here in case there is > 1 packet available
// (this lets us immediately read more without waiting for an interrupt)
fifoCount -= packetSize;
// display Euler angles in degrees
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
#ifdef OUTPUT_READABLE_YAWPITCHROLL // 센서를 통해 구한 Yaw, Pitch, Roll 값을 Serial Monitor에 표시합니다
Serial.print("ypr\t");
Serial.print(ypr[0] * 180/M_PI);
Serial.print("\t");
Serial.print(ypr[1] * 180/M_PI);
Serial.print("\t");
Serial.println(ypr[2] * 180/M_PI);
#endif
// PID 제어를 하기 위해 input 변수에 Pitch 값을 넣습니다
input = ypr[1] * 180/M_PI + 180;
#ifdef OUTPUT_TEAPOT // Processing으로 MPU6050센서의 움직임을 Visualize 하기 위한 코드
// display quaternion values in InvenSense Teapot demo format:
teapotPacket[2] = fifoBuffer[0];
teapotPacket[3] = fifoBuffer[1];
teapotPacket[4] = fifoBuffer[4];
teapotPacket[5] = fifoBuffer[5];
teapotPacket[6] = fifoBuffer[8];
teapotPacket[7] = fifoBuffer[9];
teapotPacket[8] = fifoBuffer[12];
teapotPacket[9] = fifoBuffer[13];
Serial.write(teapotPacket, 14);
teapotPacket[11]++; // packetCount, loops at 0xFF on purpose
#endif
}
}
실행 결과
In file included from C:\Users\dydtn\Documents\Arduino\sketch_dec24a\sketch_dec24a.ino:9:0:
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h: In member function 'uint8_t MPU6050::dmpGetAccel(int32_t*, const uint8_t*)':
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:580:31: warning: left shift count >= width of type [-Wshift-count-overflow]
data[0] = ((packet[28] << 24) + (packet[29] << 16) + (packet[30] << 8) + packet[31]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:580:52: warning: left shift count >= width of type [-Wshift-count-overflow]
data[0] = ((packet[28] << 24) + (packet[29] << 16) + (packet[30] << 8) + packet[31]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:581:31: warning: left shift count >= width of type [-Wshift-count-overflow]
data[1] = ((packet[32] << 24) + (packet[33] << 16) + (packet[34] << 8) + packet[35]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:581:52: warning: left shift count >= width of type [-Wshift-count-overflow]
data[1] = ((packet[32] << 24) + (packet[33] << 16) + (packet[34] << 8) + packet[35]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:582:31: warning: left shift count >= width of type [-Wshift-count-overflow]
data[2] = ((packet[36] << 24) + (packet[37] << 16) + (packet[38] << 8) + packet[39]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:582:52: warning: left shift count >= width of type [-Wshift-count-overflow]
data[2] = ((packet[36] << 24) + (packet[37] << 16) + (packet[38] << 8) + packet[39]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h: In member function 'uint8_t MPU6050::dmpGetQuaternion(int32_t*, const uint8_t*)':
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:604:30: warning: left shift count >= width of type [-Wshift-count-overflow]
data[0] = ((packet[0] << 24) + (packet[1] << 16) + (packet[2] << 8) + packet[3]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:604:50: warning: left shift count >= width of type [-Wshift-count-overflow]
data[0] = ((packet[0] << 24) + (packet[1] << 16) + (packet[2] << 8) + packet[3]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:605:30: warning: left shift count >= width of type [-Wshift-count-overflow]
data[1] = ((packet[4] << 24) + (packet[5] << 16) + (packet[6] << 8) + packet[7]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:605:50: warning: left shift count >= width of type [-Wshift-count-overflow]
data[1] = ((packet[4] << 24) + (packet[5] << 16) + (packet[6] << 8) + packet[7]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:606:30: warning: left shift count >= width of type [-Wshift-count-overflow]
data[2] = ((packet[8] << 24) + (packet[9] << 16) + (packet[10] << 8) + packet[11]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:606:50: warning: left shift count >= width of type [-Wshift-count-overflow]
data[2] = ((packet[8] << 24) + (packet[9] << 16) + (packet[10] << 8) + packet[11]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:607:31: warning: left shift count >= width of type [-Wshift-count-overflow]
data[3] = ((packet[12] << 24) + (packet[13] << 16) + (packet[14] << 8) + packet[15]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:607:52: warning: left shift count >= width of type [-Wshift-count-overflow]
data[3] = ((packet[12] << 24) + (packet[13] << 16) + (packet[14] << 8) + packet[15]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h: In member function 'uint8_t MPU6050::dmpGetGyro(int32_t*, const uint8_t*)':
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:637:31: warning: left shift count >= width of type [-Wshift-count-overflow]
data[0] = ((packet[16] << 24) + (packet[17] << 16) + (packet[18] << 8) + packet[19]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:637:52: warning: left shift count >= width of type [-Wshift-count-overflow]
data[0] = ((packet[16] << 24) + (packet[17] << 16) + (packet[18] << 8) + packet[19]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:638:31: warning: left shift count >= width of type [-Wshift-count-overflow]
data[1] = ((packet[20] << 24) + (packet[21] << 16) + (packet[22] << 8) + packet[23]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:638:52: warning: left shift count >= width of type [-Wshift-count-overflow]
data[1] = ((packet[20] << 24) + (packet[21] << 16) + (packet[22] << 8) + packet[23]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:639:31: warning: left shift count >= width of type [-Wshift-count-overflow]
data[2] = ((packet[24] << 24) + (packet[25] << 16) + (packet[26] << 8) + packet[27]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:639:52: warning: left shift count >= width of type [-Wshift-count-overflow]
data[2] = ((packet[24] << 24) + (packet[25] << 16) + (packet[26] << 8) + packet[27]);
^~
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: warning: type 'struct MPU6050' violates the C++ One Definition Rule [-Wodr]
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: a different type is defined in another translation unit
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:791:22: note: the first difference of corresponding definitions is field 'dmpPacketBuffer'
uint8_t *dmpPacketBuffer;
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:993:17: note: a field with different name is defined in another translation unit
uint8_t devAddr;
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:416:14: warning: 'initialize' violates the C++ One Definition Rule [-Wodr]
void initialize();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:63:6: note: implicit this pointer type mismatch
void MPU6050::initialize() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:63:6: note: 'initialize' was previously declared here
void MPU6050::initialize() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:63:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:417:14: warning: 'testConnection' violates the C++ One Definition Rule [-Wodr]
bool testConnection();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:74:6: note: implicit this pointer type mismatch
bool MPU6050::testConnection() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:74:6: note: 'testConnection' was previously declared here
bool MPU6050::testConnection() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:74:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:732:14: warning: 'setXGyroOffset' violates the C++ One Definition Rule [-Wodr]
void setXGyroOffset(int16_t offset);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2819:6: note: implicit this pointer type mismatch
void MPU6050::setXGyroOffset(int16_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2819:6: note: 'setXGyroOffset' was previously declared here
void MPU6050::setXGyroOffset(int16_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2819:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:736:14: warning: 'setYGyroOffset' violates the C++ One Definition Rule [-Wodr]
void setYGyroOffset(int16_t offset);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2829:6: note: implicit this pointer type mismatch
void MPU6050::setYGyroOffset(int16_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2829:6: note: 'setYGyroOffset' was previously declared here
void MPU6050::setYGyroOffset(int16_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2829:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:740:14: warning: 'setZGyroOffset' violates the C++ One Definition Rule [-Wodr]
void setZGyroOffset(int16_t offset);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2839:6: note: implicit this pointer type mismatch
void MPU6050::setZGyroOffset(int16_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2839:6: note: 'setZGyroOffset' was previously declared here
void MPU6050::setZGyroOffset(int16_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2839:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:728:14: warning: 'setZAccelOffset' violates the C++ One Definition Rule [-Wodr]
void setZAccelOffset(int16_t offset);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2809:6: note: implicit this pointer type mismatch
void MPU6050::setZAccelOffset(int16_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2809:6: note: 'setZAccelOffset' was previously declared here
void MPU6050::setZAccelOffset(int16_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2809:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:652:14: warning: 'reset' violates the C++ One Definition Rule [-Wodr]
void reset();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2359:6: note: implicit this pointer type mismatch
void MPU6050::reset() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2359:6: note: 'reset' was previously declared here
void MPU6050::reset() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2359:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:654:14: warning: 'setSleepEnabled' violates the C++ One Definition Rule [-Wodr]
void setSleepEnabled(bool enabled);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2383:6: note: implicit this pointer type mismatch
void MPU6050::setSleepEnabled(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2383:6: note: 'setSleepEnabled' was previously declared here
void MPU6050::setSleepEnabled(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2383:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:769:14: warning: 'setMemoryStartAddress' violates the C++ One Definition Rule [-Wodr]
void setMemoryStartAddress(uint8_t address);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2922:6: note: implicit this pointer type mismatch
void MPU6050::setMemoryStartAddress(uint8_t address) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2922:6: note: 'setMemoryStartAddress' was previously declared here
void MPU6050::setMemoryStartAddress(uint8_t address) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2922:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:772:17: warning: 'readMemoryByte' violates the C++ One Definition Rule [-Wodr]
uint8_t readMemoryByte();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2928:9: note: implicit this pointer type mismatch
uint8_t MPU6050::readMemoryByte() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2928:9: note: 'readMemoryByte' was previously declared here
uint8_t MPU6050::readMemoryByte() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2928:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:766:14: warning: 'setMemoryBank' violates the C++ One Definition Rule [-Wodr]
void setMemoryBank(uint8_t bank, bool prefetchEnabled=false, bool userBank=false);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2913:6: note: implicit this pointer type mismatch
void MPU6050::setMemoryBank(uint8_t bank, bool prefetchEnabled, bool userBank) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2913:6: note: 'setMemoryBank' was previously declared here
void MPU6050::setMemoryBank(uint8_t bank, bool prefetchEnabled, bool userBank) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2913:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:693:17: warning: 'getOTPBankValid' violates the C++ One Definition Rule [-Wodr]
uint8_t getOTPBankValid();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2718:9: note: implicit this pointer type mismatch
uint8_t MPU6050::getOTPBankValid() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2718:9: note: 'getOTPBankValid' was previously declared here
uint8_t MPU6050::getOTPBankValid() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2718:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:695:16: warning: 'getXGyroOffsetTC' violates the C++ One Definition Rule [-Wodr]
int8_t getXGyroOffsetTC();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2725:8: note: implicit this pointer type mismatch
int8_t MPU6050::getXGyroOffsetTC() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2725:8: note: 'getXGyroOffsetTC' was previously declared here
int8_t MPU6050::getXGyroOffsetTC() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2725:8: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:699:16: warning: 'getYGyroOffsetTC' violates the C++ One Definition Rule [-Wodr]
int8_t getYGyroOffsetTC();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2735:8: note: implicit this pointer type mismatch
int8_t MPU6050::getYGyroOffsetTC() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2735:8: note: 'getYGyroOffsetTC' was previously declared here
int8_t MPU6050::getYGyroOffsetTC() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2735:8: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:703:16: warning: 'getZGyroOffsetTC' violates the C++ One Definition Rule [-Wodr]
int8_t getZGyroOffsetTC();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2745:8: note: implicit this pointer type mismatch
int8_t MPU6050::getZGyroOffsetTC() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2745:8: note: 'getZGyroOffsetTC' was previously declared here
int8_t MPU6050::getZGyroOffsetTC() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2745:8: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:645:14: warning: 'setI2CMasterModeEnabled' violates the C++ One Definition Rule [-Wodr]
void setI2CMasterModeEnabled(bool enabled);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2308:6: note: implicit this pointer type mismatch
void MPU6050::setI2CMasterModeEnabled(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2308:6: note: 'setI2CMasterModeEnabled' was previously declared here
void MPU6050::setI2CMasterModeEnabled(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2308:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:505:14: warning: 'setSlaveAddress' violates the C++ One Definition Rule [-Wodr]
void setSlaveAddress(uint8_t num, uint8_t address);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:912:6: note: implicit this pointer type mismatch
void MPU6050::setSlaveAddress(uint8_t num, uint8_t address) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:912:6: note: 'setSlaveAddress' was previously declared here
void MPU6050::setSlaveAddress(uint8_t num, uint8_t address) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:912:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:648:14: warning: 'resetI2CMaster' violates the C++ One Definition Rule [-Wodr]
void resetI2CMaster();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2333:6: note: implicit this pointer type mismatch
void MPU6050::resetI2CMaster() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2333:6: note: 'resetI2CMaster' was previously declared here
void MPU6050::resetI2CMaster() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2333:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:776:14: warning: 'writeProgMemoryBlock' violates the C++ One Definition Rule [-Wodr]
bool writeProgMemoryBlock(const uint8_t *data, uint16_t dataSize, uint8_t bank=0, uint8_t address=0, bool verify=true);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3042:6: note: implicit this pointer type mismatch
bool MPU6050::writeProgMemoryBlock(const uint8_t *data, uint16_t dataSize, uint8_t bank, uint8_t address, bool verify) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3042:6: note: 'writeProgMemoryBlock' was previously declared here
bool MPU6050::writeProgMemoryBlock(const uint8_t *data, uint16_t dataSize, uint8_t bank, uint8_t address, bool verify) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3042:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:779:14: warning: 'writeProgDMPConfigurationSet' violates the C++ One Definition Rule [-Wodr]
bool writeProgDMPConfigurationSet(const uint8_t *data, uint16_t dataSize);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3120:6: note: implicit this pointer type mismatch
bool MPU6050::writeProgDMPConfigurationSet(const uint8_t *data, uint16_t dataSize) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3120:6: note: 'writeProgDMPConfigurationSet' was previously declared here
bool MPU6050::writeProgDMPConfigurationSet(const uint8_t *data, uint16_t dataSize) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3120:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:660:14: warning: 'setClockSource' violates the C++ One Definition Rule [-Wodr]
void setClockSource(uint8_t source);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2476:6: note: implicit this pointer type mismatch
void MPU6050::setClockSource(uint8_t source) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2476:6: note: 'setClockSource' was previously declared here
void MPU6050::setClockSource(uint8_t source) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2476:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:565:14: warning: 'setIntEnabled' violates the C++ One Definition Rule [-Wodr]
void setIntEnabled(uint8_t enabled);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:1499:6: note: implicit this pointer type mismatch
void MPU6050::setIntEnabled(uint8_t enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:1499:6: note: 'setIntEnabled' was previously declared here
void MPU6050::setIntEnabled(uint8_t enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:1499:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:425:14: warning: 'setRate' violates the C++ One Definition Rule [-Wodr]
void setRate(uint8_t rate);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:132:6: note: implicit this pointer type mismatch
void MPU6050::setRate(uint8_t rate) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:132:6: note: 'setRate' was previously declared here
void MPU6050::setRate(uint8_t rate) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:132:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:429:14: warning: 'setExternalFrameSync' violates the C++ One Definition Rule [-Wodr]
void setExternalFrameSync(uint8_t sync);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:174:6: note: implicit this pointer type mismatch
void MPU6050::setExternalFrameSync(uint8_t sync) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:174:6: note: 'setExternalFrameSync' was previously declared here
void MPU6050::setExternalFrameSync(uint8_t sync) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:174:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:431:14: warning: 'setDLPFMode' violates the C++ One Definition Rule [-Wodr]
void setDLPFMode(uint8_t bandwidth);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:217:6: note: implicit this pointer type mismatch
void MPU6050::setDLPFMode(uint8_t mode) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:217:6: note: 'setDLPFMode' was previously declared here
void MPU6050::setDLPFMode(uint8_t mode) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:217:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:435:14: warning: 'setFullScaleGyroRange' violates the C++ One Definition Rule [-Wodr]
void setFullScaleGyroRange(uint8_t range);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:252:6: note: implicit this pointer type mismatch
void MPU6050::setFullScaleGyroRange(uint8_t range) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:252:6: note: 'setFullScaleGyroRange' was previously declared here
void MPU6050::setFullScaleGyroRange(uint8_t range) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:252:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:783:14: warning: 'setDMPConfig1' violates the C++ One Definition Rule [-Wodr]
void setDMPConfig1(uint8_t config);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3130:6: note: implicit this pointer type mismatch
void MPU6050::setDMPConfig1(uint8_t config) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3130:6: note: 'setDMPConfig1' was previously declared here
void MPU6050::setDMPConfig1(uint8_t config) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3130:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:787:14: warning: 'setDMPConfig2' violates the C++ One Definition Rule [-Wodr]
void setDMPConfig2(uint8_t config);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3140:6: note: implicit this pointer type mismatch
void MPU6050::setDMPConfig2(uint8_t config) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3140:6: note: 'setDMPConfig2' was previously declared here
void MPU6050::setDMPConfig2(uint8_t config) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3140:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:694:14: warning: 'setOTPBankValid' violates the C++ One Definition Rule [-Wodr]
void setOTPBankValid(bool enabled);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2722:6: note: implicit this pointer type mismatch
void MPU6050::setOTPBankValid(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2722:6: note: 'setOTPBankValid' was previously declared here
void MPU6050::setOTPBankValid(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2722:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:696:14: warning: 'setXGyroOffsetTC' violates the C++ One Definition Rule [-Wodr]
void setXGyroOffsetTC(int8_t offset);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2729:6: note: implicit this pointer type mismatch
void MPU6050::setXGyroOffsetTC(int8_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2729:6: note: 'setXGyroOffsetTC' was previously declared here
void MPU6050::setXGyroOffsetTC(int8_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2729:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:700:14: warning: 'setYGyroOffsetTC' violates the C++ One Definition Rule [-Wodr]
void setYGyroOffsetTC(int8_t offset);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2739:6: note: implicit this pointer type mismatch
void MPU6050::setYGyroOffsetTC(int8_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2739:6: note: 'setYGyroOffsetTC' was previously declared here
void MPU6050::setYGyroOffsetTC(int8_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2739:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:704:14: warning: 'setZGyroOffsetTC' violates the C++ One Definition Rule [-Wodr]
void setZGyroOffsetTC(int8_t offset);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2749:6: note: implicit this pointer type mismatch
void MPU6050::setZGyroOffsetTC(int8_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2749:6: note: 'setZGyroOffsetTC' was previously declared here
void MPU6050::setZGyroOffsetTC(int8_t offset) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2749:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:459:14: warning: 'setMotionDetectionThreshold' violates the C++ One Definition Rule [-Wodr]
void setMotionDetectionThreshold(uint8_t threshold);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:472:6: note: implicit this pointer type mismatch
void MPU6050::setMotionDetectionThreshold(uint8_t threshold) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:472:6: note: 'setMotionDetectionThreshold' was previously declared here
void MPU6050::setMotionDetectionThreshold(uint8_t threshold) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:472:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:467:14: warning: 'setZeroMotionDetectionThreshold' violates the C++ One Definition Rule [-Wodr]
void setZeroMotionDetectionThreshold(uint8_t threshold);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:542:6: note: implicit this pointer type mismatch
void MPU6050::setZeroMotionDetectionThreshold(uint8_t threshold) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:542:6: note: 'setZeroMotionDetectionThreshold' was previously declared here
void MPU6050::setZeroMotionDetectionThreshold(uint8_t threshold) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:542:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:463:14: warning: 'setMotionDetectionDuration' violates the C++ One Definition Rule [-Wodr]
void setMotionDetectionDuration(uint8_t duration);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:502:6: note: implicit this pointer type mismatch
void MPU6050::setMotionDetectionDuration(uint8_t duration) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:502:6: note: 'setMotionDetectionDuration' was previously declared here
void MPU6050::setMotionDetectionDuration(uint8_t duration) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:502:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:471:14: warning: 'setZeroMotionDetectionDuration' violates the C++ One Definition Rule [-Wodr]
void setZeroMotionDetectionDuration(uint8_t duration);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:573:6: note: implicit this pointer type mismatch
void MPU6050::setZeroMotionDetectionDuration(uint8_t duration) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:573:6: note: 'setZeroMotionDetectionDuration' was previously declared here
void MPU6050::setZeroMotionDetectionDuration(uint8_t duration) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:573:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:643:14: warning: 'setFIFOEnabled' violates the C++ One Definition Rule [-Wodr]
void setFIFOEnabled(bool enabled);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2284:6: note: implicit this pointer type mismatch
void MPU6050::setFIFOEnabled(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2284:6: note: 'setFIFOEnabled' was previously declared here
void MPU6050::setFIFOEnabled(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2284:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:763:14: warning: 'resetDMP' violates the C++ One Definition Rule [-Wodr]
void resetDMP();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2907:6: note: implicit this pointer type mismatch
void MPU6050::resetDMP() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2907:6: note: 'resetDMP' was previously declared here
void MPU6050::resetDMP() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2907:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:774:14: warning: 'readMemoryBlock' violates the C++ One Definition Rule [-Wodr]
void readMemoryBlock(uint8_t *data, uint16_t dataSize, uint8_t bank=0, uint8_t address=0);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2935:6: note: implicit this pointer type mismatch
void MPU6050::readMemoryBlock(uint8_t *data, uint16_t dataSize, uint8_t bank, uint8_t address) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2935:6: note: 'readMemoryBlock' was previously declared here
void MPU6050::readMemoryBlock(uint8_t *data, uint16_t dataSize, uint8_t bank, uint8_t address) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2935:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:679:18: warning: 'getFIFOCount' violates the C++ One Definition Rule [-Wodr]
uint16_t getFIFOCount();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2641:10: note: implicit this pointer type mismatch
uint16_t MPU6050::getFIFOCount() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2641:10: note: 'getFIFOCount' was previously declared here
uint16_t MPU6050::getFIFOCount() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2641:10: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:684:14: warning: 'getFIFOBytes' violates the C++ One Definition Rule [-Wodr]
void getFIFOBytes(uint8_t *data, uint8_t length);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2677:6: note: implicit this pointer type mismatch
void MPU6050::getFIFOBytes(uint8_t *data, uint8_t length) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2677:6: note: 'getFIFOBytes' was previously declared here
void MPU6050::getFIFOBytes(uint8_t *data, uint8_t length) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2677:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:775:14: warning: 'writeMemoryBlock' violates the C++ One Definition Rule [-Wodr]
bool writeMemoryBlock(const uint8_t *data, uint16_t dataSize, uint8_t bank=0, uint8_t address=0, bool verify=true, bool useProgMem=false);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2966:6: note: implicit this pointer type mismatch
bool MPU6050::writeMemoryBlock(const uint8_t *data, uint16_t dataSize, uint8_t bank, uint8_t address, bool verify, bool useProgMem) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2966:6: note: 'writeMemoryBlock' was previously declared here
bool MPU6050::writeMemoryBlock(const uint8_t *data, uint16_t dataSize, uint8_t bank, uint8_t address, bool verify, bool useProgMem) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2966:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:762:14: warning: 'setDMPEnabled' violates the C++ One Definition Rule [-Wodr]
void setDMPEnabled(bool enabled);
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2904:6: note: implicit this pointer type mismatch
void MPU6050::setDMPEnabled(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2904:6: note: 'setDMPEnabled' was previously declared here
void MPU6050::setDMPEnabled(bool enabled) {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2904:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:647:14: warning: 'resetFIFO' violates the C++ One Definition Rule [-Wodr]
void resetFIFO();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2324:6: note: implicit this pointer type mismatch
void MPU6050::resetFIFO() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2324:6: note: 'resetFIFO' was previously declared here
void MPU6050::resetFIFO() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:2324:6: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:580:17: warning: 'getIntStatus' violates the C++ One Definition Rule [-Wodr]
uint8_t getIntStatus();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:1628:9: note: implicit this pointer type mismatch
uint8_t MPU6050::getIntStatus() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:1628:9: note: 'getIntStatus' was previously declared here
uint8_t MPU6050::getIntStatus() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:1628:9: note: code may be misoptimized unless -fno-strict-aliasing is used
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:413:9: warning: '__comp_ctor ' violates the C++ One Definition Rule [-Wodr]
MPU6050();
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:42:1: note: implicit this pointer type mismatch
MPU6050::MPU6050() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:411:7: note: type 'struct MPU6050' itself violates the C++ One Definition Rule
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050/MPU6050.h:411:7: note: the incompatible type is defined here
class MPU6050 {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:42:1: note: '__comp_ctor ' was previously declared here
MPU6050::MPU6050() {
^
C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:42:1: note: code may be misoptimized unless -fno-strict-aliasing is used
스케치는 프로그램 저장 공간 17864 바이트(55%)를 사용. 최대 32256 바이트.
전역 변수는 동적 메모리 668바이트(32%)를 사용, 1380바이트의 지역변수가 남음. 최대는 2048 바이트.
-----------------------------------------------------------------------------------------------------------
실행 결과는 컴파일, 업로드 모두 완료는 되지만 오류가 계속 뜨고 있는 상황입니다.!
진짜 여러 사이트에서 문제점이 무엇인지 정말로 많은 구글링했습니다. 근데 제가 궁금해했던 질문들은 하라도 없더라구요. 제가 너무 간단한 문제에서 허덕이고 있는 것 같은데 너무 답답합니다.. 제발 도와주세요..
|