Skip to content

Commit

Permalink
Merge pull request #139 from Bit-Mac/Bit-Mac-patch-1
Browse files Browse the repository at this point in the history
Fix for negative temperatures on DS3231
  • Loading branch information
drak7 authored Mar 27, 2020
2 parents b20cbb6 + 41d113c commit 3eaf0ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RTClib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,8 @@ void RTC_DS3231::writeSqwPinMode(Ds3231SqwPinMode mode) {
/**************************************************************************/
float RTC_DS3231::getTemperature()
{
uint8_t msb, lsb;
uint8_t lsb;
int8_t msb;
Wire.beginTransmission(DS3231_ADDRESS);
Wire._I2C_WRITE(DS3231_TEMPERATUREREG);
Wire.endTransmission();
Expand Down

0 comments on commit 3eaf0ca

Please sign in to comment.