Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
LM19.cpp
00001 //.cpp file for temperature sensore, defines coefficients and functions 00002 00003 #include "LM19.h" //include .h file to take variables/functions from class 00004 00005 LM19::LM19(PinName in1): _in1(in1) { //LM19 function is in class LM19, define pin 00006 //initialize coefficients- corresponds to temperature sensor data 00007 c1= -1481.96; 00008 c2= 2.1962*1000000.000; 00009 c3= 1.8636; 00010 c4= 3.88/1000000.000; 00011 } //close LM19 00012 00013 float LM19::temp(){ //LM19 temperature computation function (double coulmn ::) 00014 float volt=_in1.read()*3.3; //read volt from defined pin,*3.3 to get volt from % 00015 float T=c1+sqrt(c2 + (c3-volt)/c4); //function to convert volt to temp. using coeff. 00016 return T; //returns value after function has been evaluated 00017 } //close float temp
Generated on Thu Aug 4 2022 12:14:52 by
1.7.2