-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code is wrong #8
Comments
You just needed to put thermistor and resistor the other way around.
Daniel Berenguer
http://www.panstamp.com
…On Mon, 30 Mar 2020 at 21:16, saltydog693 ***@***.***> wrote:
When you heat up the thermistor you will see the temperature dropping in
the serial monitor? It should be the other way around. Checking the library
source code (thermistor.cpp) on the calculations we found a mistake in the
calculation of the resistance.
100 // convert the value to resistance
101 average = ADC_RESOLUTION / average - 1;
102 average = serialResistance * average;
We had to correct line 102 as below (times should be divided!).
100 // convert the value to resistance
101 average = ADC_RESOLUTION / average - 1;
102 average = serialResistance / average;
Now the code works as it should be.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGX365LH3IMI6TOWHIFGM3RKDVYJANCNFSM4LW2S2IA>
.
|
Perhaps a good feature would be to add and inverting flag |
This is useful information. Many thanks for the support. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you heat up the thermistor you will see the temperature dropping in the serial monitor? It should be the other way around. Checking the library source code (thermistor.cpp) on the calculations we found a mistake in the calculation of the resistance.
100 // convert the value to resistance
101 average = ADC_RESOLUTION / average - 1;
102 average = serialResistance * average;
We had to correct line 102 as below (times should be divided!).
100 // convert the value to resistance
101 average = ADC_RESOLUTION / average - 1;
102 average = serialResistance / average;
Now the code works as it should be.
The text was updated successfully, but these errors were encountered: