TinyWireM icon indicating copy to clipboard operation
TinyWireM copied to clipboard

Example does not work correctly at negative temperatures

Open lcgamboa opened this issue 2 years ago • 0 comments

The example does not work correctly at negative temperatures in DS1621. To solve the problem, it is necessary to make a casting to char on line 98 for the value to be interpreted as negative. The code below : https://github.com/adafruit/TinyWireM/blob/bd396b8f6a3b0ca82c40b532a2b622823d25d51a/examples/Tiny85_Temp_LCD_RTC/Tiny85_Temp_LCD_RTC.pde#L98 needs to be changed to:

  tempC = (char)TinyWireM.receive();    // get the temperature

lcgamboa avatar Sep 26 '21 01:09 lcgamboa