class MPU6050 has no member named begin

Hi all,

As I working out some scripts wich will me make a winddirection meter with GY-87 I would like to calibrate the compass sensor on this board.
I was using the script "HMC5883L_calibrate_MPU6050" from Korneliusz Jarzebski.
I get fault "class MPU6050 has no member named begin"

/*
Calibrate HMC5883L + MPU6050 (GY-86 / GY-87). Output for HMC5883L_calibrate_processing.pde
Read more: /dev/jarzebski: 3-osiowy magnetometr HMC5883L
GIT: GitHub - jarzebski/Arduino-HMC5883L: HMC5883L Triple Axis Digital Compass Arduino Library
Web: http://www.jarzebski.pl
(c) 2014 by Korneliusz Jarzebski
*/

#include <Wire.h>
#include <HMC5883L.h>
#include <MPU6050.h>

HMC5883L compass;
MPU6050 mpu;

int minX = 0;
int maxX = 0;
int minY = 0;
int maxY = 0;
int offX = 0;
int offY = 0;

void setup()
{
Serial.begin(9600);

// Initialize MPU6050
while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
{
delay(500);
}
How to slove this error?
Any help is apreciated.
Kind regards,
ilioSS

What the compiler is complaining about is the fact that there is no method named .begin() in the class "MPU6050" as defined in MPU6050.h.

I take a look at this MPU6050.h file in GitHub. If it's the same .h that you are using, the correct method call would be .initialize() I think. There is no method in the file that is named .begin().

initialize() is not working too

I think you have to find out from Korneliusz Jarzebski which MPU6050 library is being used in that sketch.