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
1MOhm thermistors are not uncommon. 1,000,000 overflows a 16 bit unsigned int.
Bumping the resistor types up to uint32_t seems to fix the overflow.
While I'm bug reporting, is #define VERBOSE_SENSOR_ENABLED 1 really an appropriate default? That seems like something somebody should have to enable if they are debugging.
And finally, why do you return the temperature multiplied by 10?
The text was updated successfully, but these errors were encountered:
You can divide resistor values by a common number, all that matters is the ratio.
I have a 100K thermistor and a 99K resistor, so I use it with '100' and '99' -- it works.
You can change the #define if you want, helped me a lot when I started it, otherwise I would have missed something. But I guess there should be a more elegant solution.
The temperature is multiplied by 10 because it's an int so otherwise, you wouldn't get the first decimal. Those thermistors have about that accuracy, usually. Though, if you only want 1 degree accuracy, you can hack it out (but then use round() before casting to int, or you'll systematically round down, like 19.9 to 19).
1MOhm thermistors are not uncommon. 1,000,000 overflows a 16 bit unsigned int.
Bumping the resistor types up to uint32_t seems to fix the overflow.
While I'm bug reporting, is
#define VERBOSE_SENSOR_ENABLED 1
really an appropriate default? That seems like something somebody should have to enable if they are debugging.And finally, why do you return the temperature multiplied by 10?
The text was updated successfully, but these errors were encountered: