Mark Schwarzer / LM19_Driver
Revision:
0:7de985c38ade
diff -r 000000000000 -r 7de985c38ade LM19_Driver.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LM19_Driver.cpp	Mon Nov 09 14:25:38 2020 +0000
@@ -0,0 +1,13 @@
+#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;
+    }
\ No newline at end of file