temperature sensor

  1. I want to measure temperature with the mpu6050 mpdule. Heres the code i used
#include <Wire.h>
#include <MPU6050.h>

MPU6050 mpu;

void setup() 

  Serial.println("Initialize MPU6050");

  while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
    Serial.println("Could not find a valid MPU6050 sensor, check wiring!");

void loop()
  float temp = mpu.readTemperature();

  Serial.print(" Temp = ");
  Serial.println(" *C");

however I get a error saying "class MPU6050 has no member named ‘begin’ "

  1. Is there any way to search a specific topic in the forum


It suggests the command “ begin” doesn’t exist for that library.

Have a look at the ide examples for that library and study the sintax, you’ve made an error there or are using scanked code intended for use with a different library .

Do the examples that come with the library that you are using use the begin function? There are more than one library with that same name and they don't all use the same syntax.