Skip to content

Code is wrong #8

@saltydog693

Description

@saltydog693

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions