roneos
Operating System for the r-one robot
 All Data Structures Files Functions Variables Typedefs Groups
gyro.h File Reference

Interface to initialize and read 3D gyro data. More...

Go to the source code of this file.

Functions

void gyro_init (void)
 Initialize gyro. More...
 
int32 gyroGetValue (uint32 axis)
 Get gyro value on axis. More...
 
void gyroUpdate (uint8 msgIn[])
 Update gyro values. More...
 

Detailed Description

Interface to initialize and read 3D gyro data.

Since
July 22, 2010
Author
James McLurkin

Function Documentation

void gyro_init ( void  )

Initialize gyro.

(gyroX, gyroY, gyroZ) initialized to 0.

Returns
void
int32 gyroGetValue ( uint32  axis)

Get gyro value on axis.

Parameters
axisspecifies GYRO_X_AXIS, GYRO_Y_AXIS, or GYRO_Z_AXIS.
Returns
if argument is valid axis, gyro value on specified axis; else, 0
void gyroUpdate ( uint8  msgIn[])

Update gyro values.

gyroX, gyroY, and gyroZ are updated by values in msgIn that are concatenated in pairs according to axis. Each pair of 9-bit integers converted into one 16-bit integer.

Parameters
msgInis array of length 6
Returns
void