Datasheet
Alternate Units:
The values reported by the read() function are in degrees-per-second (dps) For some calculations, it may be more
convenient to work in radians. To convert dps to radians-per-second (rad/s), simply multiply by 0.017453293 as in the
following code:
Calibration:
The L3GD20 is calibrated at the factory to close tolerances and will provide sufficient accuracy for most applications.
For critical applications where maximum accuracy is required, the gyro should be calibrated for zero-rate and
sensitivity. For detailed information on how to calibrate a MEMS gyro, please refer to section 5.3 of this technical
article (https://adafru.it/c7L).
void loop()
{
gyro.read();
Serial.print("X: "); Serial.print((int)gyro.data.x); Serial.print(" ");
Serial.print("Y: "); Serial.print((int)gyro.data.y); Serial.print(" ");
Serial.print("Z: "); Serial.println((int)gyro.data.z); Serial.print(" ");
delay(100);
}
#define SENSORS_DPS_TO_RADS (0.017453293F) /**< Degrees/s to rad/s multiplier */
void loop()
{
gyro.read();
Serial.print("X: "); Serial.print((int)gyro.data.x * SENSORS_DPS_TO_RADS); Serial.print(" ");
Serial.print("Y: "); Serial.print((int)gyro.data.y * SENSORS_DPS_TO_RADS); Serial.print(" ");
Serial.print("Z: "); Serial.println((int)gyro.data.z * SENSORS_DPS_TO_RADS); Serial.print(" ");
delay(100);
}
The L3GD20 includes an on-chip temperature sensor, but this sensor isn't intended to be used to measure
ambient temperature. The register seems to be used to provide a temperature offset for the die temperature
to account for variation across multiple gyros or over time, but the value this offset is relative to unfortunately
isn't specified in the datasheet, so there is no obvious way to use it in a useful manner as-is.
© Adafruit Industries https://learn.adafruit.com/adafruit-triple-axis-gyro-breakout Page 10 of 18