Mackenzie Fraser / LM19_Driver

LM19_Driver.cpp

Committer:
mackenziefraser
Date:
2021-11-10
Revision:
0:876059873ad6
Child:
1:6249f99332e0

File content as of revision 0:876059873ad6:

#include "LM19_Driver.h"

LM19::LM19(PinName in1): _in1(in1) {
    c1 = -1481.96;
    c2 = 2.1962*1000000.000;
    c3 = 1.8636;
    c4 = 3.88/1000000.000;
}

float LM19::temp(){
    float volt=_in1.read()*3.3;
    float T=c1+sqrt(c2 + (c3-volt)/c4);
    return T;
}