You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing my bean within a fridge and when the temperature fell to 0 it seems the reading overflows and hits 255 instead of showing a negative representation. This was done using the temp request function within bean.js just as was done in the examples.
The text was updated successfully, but these errors were encountered:
That's the expected behavior. getTemperature returns an int8_t, which is a signed 8-bit integer which can represent numbers from -127 to 128 (which suffices, considering the bean can report temperatures from -40C to 88C). The negative numbers are represented in the "upper half" of the 0-255 range, adding the negative number to 256. In other words, 255 is -1 (256 - 1), 254 is -2 (256 - 2), etc.
I was testing my bean within a fridge and when the temperature fell to 0 it seems the reading overflows and hits 255 instead of showing a negative representation. This was done using the temp request function within bean.js just as was done in the examples.
The text was updated successfully, but these errors were encountered: