Skip to content

MPU6050 — X/Y/Z axis angular velocity (mpu6050_get_gyro)

What it does: Returns the angular velocity of the selected axis (X, Y, Z) from the MPU6050 gyroscope.

mpu6050_get_gyro

Inputs

  • Field axis: axis selection (X, Y, Z).

Output

  • Number: angular velocity of the selected axis (typically °/s).

When to use it

  • For rotation control, motion dynamics estimation or orientation integration.
  • After mpu6050 aktualizovat data to match current data.

Tips and pitfalls

  • Gyro range depends on library configuration (typically from ±250 to ±2000 °/s).
  • Gyro tends to drift, therefore calibration and eventual fusing with accelerometer is important.

Usage example

example_mpu6050

Open example in ESP IDE

Generated Python example

value = mpu.getGyro()[0]