Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,16 +346,16 @@ Reads the temperature from the sensor (Celsius).
#### Syntax

```
IMU.readTemperature()
IMU.readTemperature(temperature_deg)
```

#### Parameters

None.
* _temperature_deg_: int variable where the temperature value will be stored.

#### Returns

The temperature in Celsius.
None.

#### Example

Expand All @@ -371,6 +371,38 @@ if (IMU.temperatureAvailable())
}
```

### `readTemperatureFloat()`

Reads the temperature from the sensor (Celsius).

#### Syntax

```
IMU.readTemperatureFloat(temperature_deg)
```

#### Parameters

* _temperature_deg_: float variable where the temperature value will be stored.

#### Returns

None.

#### Example

```
if (IMU.temperatureAvailable())
{
float temperature_deg = 0.0f;
IMU.readTemperatureFloat(temperature_deg);

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

### `temperatureAvailable()`

Checks if temperature data is available.
Expand Down Expand Up @@ -401,4 +433,4 @@ if (IMU.temperatureAvailable())
Serial.print(temperature_deg);
Serial.println(" °C");
}
```
```