MPU 6050 Stuck Values

TheTroubledOne
Posts: 1
Joined: Sat Nov 23, 2019 6:30 pm

MPU 6050 Stuck Values

Postby TheTroubledOne » Sat Nov 23, 2019 6:40 pm

hi guys,

i am using tokn's MPU6050 library and the following example code:

Code: Select all

#include <MPU6050_tockn.h>
#include <Wire.h>
float Yang,Xang,Zang,Y,X,Z;
MPU6050 mpu6050(Wire);

void setup() {
  Serial.begin(115200);
  Wire.begin();
  mpu6050.begin();
  mpu6050.calcGyroOffsets(true);
}

void loop() {
  mpu6050.update();
  Yang= mpu6050.getGyroAngleY();
  Xang= mpu6050.getGyroAngleX();
  Zang= mpu6050.getGyroAngleZ();
  Y= mpu6050.getGyroY();
  X= mpu6050.getGyroX();
  Z= mpu6050.getGyroZ();
  Serial.print("GyroX : ");
  Serial.print(X);
  Serial.print ("\tGyroAngX : ");
  Serial.print(Xang);
  Serial.print("\tGyroY : ");
  Serial.print(Y);
  Serial.print("\tGyroAngY : ");
  Serial.print(Yang);
  Serial.print("\tGyroZ : ");
  Serial.print(Z);
  Serial.print("\tGyroAngZ : ");
  Serial.println(Zang);
  delay(100);
  
}
For some reason, the values get stuck at random times in explanation X,Y,Z gets stuck and Xang,Yang,Zang values keeps incrementing by 0.10 .
BTW, I am using a DOIT ESP32 DEVKIT 1.

kumarjha
Posts: 1
Joined: Thu Feb 13, 2020 4:52 pm

Re: MPU 6050 Stuck Values

Postby kumarjha » Thu Feb 13, 2020 5:04 pm

Have you got your answer?

Who is online

Users browsing this forum: No registered users and 72 guests