Added new getTemperature method in order to read the internal temp of the DS3231 RTC chip

This commit is contained in:
anschrammh 2019-10-31 21:44:21 +01:00
parent 28103022cd
commit 34769ac251
2 changed files with 5 additions and 0 deletions

View File

@ -31,3 +31,7 @@ boolean RtcManager::hasLostPower() const
return _rtcRef.lostPower(); return _rtcRef.lostPower();
} }
float RtcManager::getTemperature() const
{
return _rtcRef.getTemperature();
}

View File

@ -11,6 +11,7 @@ class RtcManager
void setTime(const DateTime dateTime); void setTime(const DateTime dateTime);
void setDateTime(const DateTime dateTime); void setDateTime(const DateTime dateTime);
boolean hasLostPower() const; boolean hasLostPower() const;
float getTemperature() const;
protected: protected:
RtcManager(RTC_DS3231 &rtc); RtcManager(RTC_DS3231 &rtc);
private: private: