Data Sheet

Core Spartan Documentation Modern Robotics, Inc
Version 3.0.3 Page 33
8.2. Rate Gyro (45-2004)
The Rate Gyro is used to detect the rate of rotation. When the Rate Gyro is completely
still, the returned reading is 1.4V which produces a reading of 280° ±2°. With the sensor
idle at 280° a Counter Clockwise (CCW) rotation will increase the value of the reading
and then return to 280° once movement is stopped. A Clockwise (CW) rotation of the
gyro will cause a decrease in the return value and return to 280° once the sensor is no
longer moving. The readings are accurate to the degree. Refer to the Rate Gyro example
folder for more information on different implementation methods.
Rate Gyro functions:
CORE_ANALOG(unsigned char port)
int read(void)
CORE_ANALOG(unsigned char port)
Save the pinMode for future reads and
writes. This must be done before setup().
CORE_ANALOG GYRO(A2);
int read(void)
Returns the value read by the gyro.
int value;
value = GYRO.read();
…or…
Serial.print(GYRO.read());