Skip to content

RtcTemperature object

Michael Miller edited this page Jul 6, 2023 · 4 revisions

RtcTemperature represents the temperature one object. It is used to retrieve the temperature.

Constructors

RtcTemperature(int8_t degrees, uint8_t fraction)

Construct a temperature object from degrees (Celsius).
degrees - whole degrees Celsius
fraction - 1/100th of degree, the fractional part

Methods

float AsFloatDegC()

<return>, the temperature as a float (25.25) in Celcius

float AsFloatDegF()

<return>, the temperature as a float (77.45) in Fahrenheit

float AsCentiDegC()

<return>, the temperature as a float (2525)