@Fabio978 I get something similar. I believe it's because toFixed() returns a string and the temperature value is supposed to be 16 bit floating point number. The characters in the string that end up being read as a sint16 and converted to floating point for display just happen to represent 143.85. I tried just rounding the temperature down to an integer but that doesn't work at all. The battery works fine because it's being read as a byte, with a valid range of 0 to 100.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Fabio978 I get something similar. I believe it's because toFixed() returns a string and the temperature value is supposed to be 16 bit floating point number. The characters in the string that end up being read as a sint16 and converted to floating point for display just happen to represent 143.85. I tried just rounding the temperature down to an integer but that doesn't work at all. The battery works fine because it's being read as a byte, with a valid range of 0 to 100.