Data Sheet
Core Spartan Documentation Modern Robotics, Inc
Version 3.0.3 Page 45
void setNull(void)
Setting the gyro to null will enable the user to calibrate their gyro. The gyro must
be kept perfectly still and flat during the null operation. During the null
operation, the LED will be on and remain on until calibration is complete. It is
recommended that this function be called in setup(). This function writes to the
EEPROM every time it is called. Therefore set the gyro to 0 without writing to the
EEPROM, use the setZero() function.
GYRO.setNull();
void setZero(void)
Sets the current heading to 0. Does not calibrate the gyro. This is very useful in
line with code to reset the heading without taking up time to also calibrate.
GYRO.setZero();
unsigned int getDegrees(void);
Returns the value of the distance rotated from the null location in degrees. The
readings are based on the Cartesian coordinate system.
int value;
value = GYRO.getDegrees();
…or…
Serial.print(GYRO.getDegrees());
int getAbsolute(void);
Returns the value of the total distance rotated from the null location in degrees.
Rotating in a Clockwise fashion will produce increasing negative numbers and
rotating in a Counter Clockwise direction will produce increasing even numbers.
int value;
value = GYRO.getAbsolute();
…or…
Serial.print(GYRO.getAbsolute());










