File tree Expand file tree Collapse file tree 1 file changed +36
-4
lines changed Expand file tree Collapse file tree 1 file changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -346,16 +346,16 @@ Reads the temperature from the sensor (Celsius).
346346#### Syntax
347347
348348```
349- IMU.readTemperature()
349+ IMU.readTemperature(temperature_deg )
350350```
351351
352352#### Parameters
353353
354- None .
354+ * _ temperature_deg _ : int variable where the temperature value will be stored .
355355
356356#### Returns
357357
358- The temperature in Celsius .
358+ None .
359359
360360#### Example
361361
@@ -371,6 +371,38 @@ if (IMU.temperatureAvailable())
371371 }
372372```
373373
374+ ### ` readTemperatureFloat() `
375+
376+ Reads the temperature from the sensor (Celsius).
377+
378+ #### Syntax
379+
380+ ```
381+ IMU.readTemperatureFloat(temperature_deg)
382+ ```
383+
384+ #### Parameters
385+
386+ * _ temperature_deg_ : float variable where the temperature value will be stored.
387+
388+ #### Returns
389+
390+ None.
391+
392+ #### Example
393+
394+ ```
395+ if (IMU.temperatureAvailable())
396+ {
397+ float temperature_deg = 0.0f;
398+ IMU.readTemperatureFloat(temperature_deg);
399+
400+ Serial.print("LSM6DSOX Temperature = ");
401+ Serial.print(temperature_deg);
402+ Serial.println(" °C");
403+ }
404+ ```
405+
374406### ` temperatureAvailable() `
375407
376408Checks if temperature data is available.
@@ -401,4 +433,4 @@ if (IMU.temperatureAvailable())
401433 Serial.print(temperature_deg);
402434 Serial.println(" °C");
403435 }
404- ```
436+ ```
You can’t perform that action at this time.
0 commit comments