Thermistor

Dependents:   Nucleo_UDS_controller_Alberto_version

Thermistor.cpp

Committer:
macht
Date:
2014-09-07
Revision:
0:d4198719a504

File content as of revision 0:d4198719a504:

#include "Thermistor.h"

Thermistor::Thermistor(float T0,float R0,float B){
    T0_ = T0;
    K0_ = T0_+273.0;
    R0_ = R0;
    B_ = B;
}

float Thermistor::trans_R2T(float R){
    float K =  (B_*K0_)/(K0_*log(R/R0_)+B_);
    float temp = K-273.0;
    return temp;
}