Arduino_LSM6DS3 - gyroscopeAvailable()

Query if new gyroscope data from the IMU is available.

Syntax

IMU.gyroscopeAvailable()

Parameters

None.

Returns

0 if no new gyroscope data is available, 1 if new gyroscope data is available.

Example

float x, y, z;

if (IMU.gyroscopeAvailable()) {
    IMU.readGyroscope(x, y, z);

    Serial.print(x);
    Serial.print('\t');
    Serial.print(y);
    Serial.print('\t');
    Serial.println(z);
}

See also