Open jonaspiela opened 2 months ago
This line gives me values of 66 (degrees celcius i suppose?) in environments where it is more 21°C. https://github.com/budryerson/TFMini-Plus/blob/90f1fcd86283f51a48ce8752aabe2ecbae762e43/src/TFMPlus.cpp#L168-L170
For reference, this is my specific code:
temperature = dataPuffer[6] + dataPuffer[7] * 256; temperature = (temperature >> 3) - 256;
Only using
temperature = dataPuffer[6] + dataPuffer[7] * 256;
Gives me values of 2576 after a few minutes. Assuming this could be 25.76°C, it would be more realistic.
2576
Am I missing something? What is the correct way to get the temperature in celcius?
• The variable temperature represents chip temperature, not ambient temperature. • What I can see of your code appears to be a correct way to get temperature in Celsius. I hope that helps
temperature
This line gives me values of 66 (degrees celcius i suppose?) in environments where it is more 21°C. https://github.com/budryerson/TFMini-Plus/blob/90f1fcd86283f51a48ce8752aabe2ecbae762e43/src/TFMPlus.cpp#L168-L170
For reference, this is my specific code:
Only using
Gives me values of
2576
after a few minutes. Assuming this could be 25.76°C, it would be more realistic.Am I missing something? What is the correct way to get the temperature in celcius?