Gyroscope

A 3-axis gyroscope is a sensor used to measure the angular velocity of an object rotating around the X, Y, and Z axes in three-dimensional space. Its core purpose is to provide critical data for attitude control, navigation, and stability analysis through real-time monitoring of rotational motion.

../../../../../_images/gyroscope.png

Example: Observe the changes in angular velocity values of 3 axes through a line chart

import time
from mpython import *

time.sleep_ms(50);print(('__TITLE', 'Gyro X', 'Gyro Y', 'Gyro Z'));time.sleep_ms(50)
while True:
    print((gyroscope.get_x(), gyroscope.get_y(), gyroscope.get_z()))
    time.sleep(0.1)