Arduino_LSM6DSOX - temperatureAvailable()

Checks if temperature data is available.

Syntax

IMU.temperatureAvailable()

Parameters

None.

Returns

1 on success, 0 on failure.

Example

if (IMU.temperatureAvailable())
  {
    int temperature_deg = 0;
    IMU.readTemperature(temperature_deg);

    Serial.print("LSM6DSOX Temperature = ");
    Serial.print(temperature_deg);
    Serial.println(" °C");
  }