Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Files | Functions | Variables

Gyroscopic Sensor
[HiTechnic]

Files

file  hitechnic-gyro.h
 

HiTechnic Gyroscopic Sensor driver.


Functions

float HTGYROreadRot (tSensors link)
float HTGYROstartCal (tSensors link)
float HTGYROreadCal (tSensors link)
float HTGYROreadRot (tMUXSensor muxsensor)
float HTGYROstartCal (tMUXSensor muxsensor)
float HTGYROreadCal (tMUXSensor muxsensor)
void HTGYROsetCal (tMUXSensor muxsensor, int offset)
void HTGYROsetCal (tSensors link, int offset)

Variables

float HTGYRO_offsets [][]

Detailed Description

HiTechnic Gyroscopic Sensor


Function Documentation

float HTGYROreadCal ( tSensors  link )

Retrieve the current offset for the gyro

Parameters:
linkthe HTGYRO port number
Returns:
the offset value for the gyro
Examples:
hitechnic-gyro-SMUX-test1.c, and hitechnic-gyro-test1.c.

Definition at line 176 of file hitechnic-gyro.h.

float HTGYROreadCal ( tMUXSensor  muxsensor )

Retrieve the current offset for the gyro

Parameters:
muxsensorthe SMUX sensor port number
Returns:
the offset value for the gyro

Definition at line 187 of file hitechnic-gyro.h.

float HTGYROreadRot ( tMUXSensor  muxsensor )

Read the value of the gyro

Parameters:
muxsensorthe SMUX sensor port number
Returns:
the value of the gyro

Definition at line 89 of file hitechnic-gyro.h.

float HTGYROreadRot ( tSensors  link )

Read the value of the gyro

Parameters:
linkthe HTGYRO port number
Returns:
the value of the gyro
Examples:
hitechnic-gyro-SMUX-test1.c, hitechnic-gyro-test1.c, and hitechnic-gyro-test2.c.

Definition at line 72 of file hitechnic-gyro.h.

void HTGYROsetCal ( tMUXSensor  muxsensor,
int  offset 
)

Override the current offset for the gyro manually

Parameters:
muxsensorthe SMUX sensor port number
offsetthe new offset to be used

Definition at line 165 of file hitechnic-gyro.h.

void HTGYROsetCal ( tSensors  link,
int  offset 
)

Override the current offset for the gyro manually

Parameters:
linkthe HTGYRO port number
offsetthe new offset to be used

Definition at line 153 of file hitechnic-gyro.h.

float HTGYROstartCal ( tSensors  link )

Calibrate the gyro by calculating the average offset of 5 raw readings.

Parameters:
linkthe HTGYRO port number
Returns:
the new offset value for the gyro
Examples:
hitechnic-gyro-SMUX-test1.c, hitechnic-gyro-test1.c, and hitechnic-gyro-test2.c.

Definition at line 100 of file hitechnic-gyro.h.

float HTGYROstartCal ( tMUXSensor  muxsensor )

Calibrate the gyro by calculating the average offset of 50 raw readings.

Parameters:
muxsensorthe SMUX sensor port number
Returns:
the new offset value for the gyro

Definition at line 129 of file hitechnic-gyro.h.


Variable Documentation

float HTGYRO_offsets[][]
Initial value:
 {{620.0, 620.0, 620.0, 620.0}, 
                          {620.0, 620.0, 620.0, 620.0},
                          {620.0, 620.0, 620.0, 620.0},
                          {620.0, 620.0, 620.0, 620.0}}

Definition at line 62 of file hitechnic-gyro.h.