NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages

This is an example of how to use the SetSensorDIGyro, SetSensorDIGyroEx, SensorDIGyroTemperature, SensorDIGyroStatus, ReadSensorDIGyroRaw, and ReadSensorDIGyro functions.

//#define RAW
#define DEFAULT
task main(){
#ifdef DEFAULT
int i = 0;
int temp;
byte status;
bool done = false;
while (!done){
// Read the GYROSCOPE
#ifdef RAW
if (!ReadSensorDIGyroRaw(S1, val))
if (!ReadSensorDIGyro(S1, val))
TextOut(0, LCD_LINE8, "fail");
NumOut(0, LCD_LINE1, val.X);
NumOut(0, LCD_LINE2, val.Y);
NumOut(0, LCD_LINE3, val.Z);