How can solve this error . Please help me

#include <Geometry.h>

#include <Wire.h>                  //Include WIre library for using I2C 

#include <MPU6050_light.h>


MPU6050  mpu(Wire) ;

int16_t MPU;

const int MPU_addr=0x68;         //I2C MPU6050 Address

int16_t axis_X,axis_Y,axis_Z;    

int minVal=265;

int maxVal=402;

double x;
double y;
double z;





void setup()
{
  Wire.begin();                        //Begins I2C communication
  
Wire.beginTransmission(MPU_addr);    //Begins Transmission with MPU6050
  
Wire.write(0x6B);                    //Puts MPU6050 in Sleep Mode

  Wire.write(0);                       //Puts MPU6050 in power mode 

  Wire.endTransmission(true);          //Ends Trasmission

}

void loop()
{


 Wire.beginTransmission(MPU_addr); //Begins I2C transmission 
 

 Wire.write(0x3B);                 //Start with register 0x3B (ACCEL_XOUT_H)             
 
 
Wire.endTransmission(false);
  

Wire.requestFrom(MPU_addr,14,true); //Request 14 Registers from MPU6050



int xAng = map(axis_X,minVal,maxVal, 0 ,360); 


int yAng = map(axis_Y,minVal,maxVal, 0 ,360);


int zAng = map(axis_Z,minVal,maxVal, 0 ,360);


 x= RAD_TO_DEG * (atan2(-yAng, -zAng)+PI);     //Formula to calculate x values in degree


 y= RAD_TO_DEG * (atan2(-zAng, -xAng)+PI);     //Formula to calculate y values in degree



Serial.print(x= RAD_TO_DEG * (atan2(-yAng, -zAng)+PI));


Serial.print(";");   


mpu.dmpGetQuaternion(&q,fifoBuffer);


mpu.dmpGetEuler(euler, &q);


Serial.print("euler\t");


Serial.print(euler[0] * 180/M_PI);


Serial.print("\t");


Serial.print(euler[1] * 180/M_PI);


Serial.print("\t");


Serial.println(euler[2] * 180/M_PI);


'Arduino: 1.8.13 (Windows 7), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

C:\Users--------\sketch_may23a\sketch_may23a.ino: In function 'void loop()':

sketch_may23a:53:5: error: 'class MPU6050' has no member named 'dmpGetQuaternion'

mpu.dmpGetQuaternion(&q,fifoBuffer);

 ^~~~~~~~~~~~~~~~

sketch_may23a:53:23: error: 'q' was not declared in this scope

mpu.dmpGetQuaternion(&q,fifoBuffer);

                   ^

sketch_may23a:53:25: error: 'fifoBuffer' was not declared in this scope

mpu.dmpGetQuaternion(&q,fifoBuffer);

                     ^~~~~~~~~~

sketch_may23a:55:5: error: 'class MPU6050' has no member named 'dmpGetEuler'

mpu.dmpGetEuler(euler, &q);

 ^~~~~~~~~~~

sketch_may23a:55:17: error: 'euler' was not declared in this scope

mpu.dmpGetEuler(euler, &q);

             ^~~~~

C:\Users-------\sketch_may23a\sketch_may23a.ino:55:17: note: suggested alternative: 'extern'

mpu.dmpGetEuler(euler, &q);

             ^~~~~

             extern

exit status 1

'class MPU6050' has no member named 'dmpGetQuaternion'

please edit your post, select the code part and press the </> icon in the tool bar to mark it as code. It’s barely readable as it stands. (also make sure you indented the code in the IDE before copying, that’s done by pressing ctrlT on a PC or cmdT on a Mac)

Once this is done explain what is the error…

i am a new guy here so i don't know to edit code will u tell me

Go read the stickies pinned at the top of the forum. You’ll see the forum’s rule. That’s where you usually start when you want to join a group…

Please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

Hello and good morning
did you ask for in the WWW to find:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.