RobotCore
Robot Core Documentation
Classes | Public Member Functions | Static Public Member Functions | List of all members
robotCore.Gyro Class Reference

The Gyro class reads a 3 axis gyro. More...

Public Member Functions

void Reset ()
 
void ResetYaw (double yaw)
 
double getYaw ()
 
double GetPitch ()
 
double GetRoll ()
 

Static Public Member Functions

static int NormalizeAngle (int angle)
 

Detailed Description

The Gyro class reads a 3 axis gyro.

Author
John Gaby

The Gyro class reads a 3 axis gyro which is connected to the Arduino The yaw, pitch, and roll is computed by the Arduino and the result is sent to the pi via the serial connection

Note that you can create multiple instances of this class. Each instance will reference the same physical gyro, but may have independent zero points for the yaw, pitch and roll.

Member Function Documentation

◆ GetPitch()

double robotCore.Gyro.GetPitch ( )
Returns
Returns the current pitch as an angle between -180 and +180 degrees

◆ GetRoll()

double robotCore.Gyro.GetRoll ( )
Returns
Returns the current roll as an angle between -180 and +180 degrees

◆ getYaw()

double robotCore.Gyro.getYaw ( )
Returns
Returns the current yaw as an angle between -180 and +180 degrees

◆ Reset()

void robotCore.Gyro.Reset ( )

Resets the yaw, pitch and roll to zero.

◆ ResetYaw()

void robotCore.Gyro.ResetYaw ( double  yaw)
Parameters
yaw- Specifies the new value for the yaw.

The documentation for this class was generated from the following file: