VEX IQ Python API
Public Member Functions | List of all members
vexiq.Gyro Class Reference

Config Gyroscope sensor. More...

Public Member Functions

def __init__ (self, port=None, calibrate=True)
 
def angle (self, value=None)
 Get or set the angle, -180 to +180 degrees. More...
 
def calibrate (self, level=12)
 Calibrate the gyro. More...
 
def is_calibrating (self)
 True if calibration is in progress, false otherwise. More...
 

Detailed Description

Config Gyroscope sensor.

Parameters
port1-12, None to autodetect. Default None.
calibrateTrue to start calibration. Default False.

Constructor & Destructor Documentation

◆ __init__()

def vexiq.Gyro.__init__ (   self,
  port = None,
  calibrate = True 
)

Member Function Documentation

◆ angle()

def vexiq.Gyro.angle (   self,
  value = None 
)

Get or set the angle, -180 to +180 degrees.

Zero if calibration is in progress.

Returns
number [-180..180] if value is None

◆ calibrate()

def vexiq.Gyro.calibrate (   self,
  level = 12 
)

Calibrate the gyro.

Default setting takes around 8 seconds.

Parameters
level6-15, degree of calibration higher value takes a longer average (default 12).

◆ is_calibrating()

def vexiq.Gyro.is_calibrating (   self)

True if calibration is in progress, false otherwise.

Returns
bool