1 float GetTempera2(u16 ad) 2 { 3 float R2 = 36.5;//分压电阻36.5K 4 float B = 3950.0; 5 float R25 = 100.0;//100kOhm 6 7 float R1 = R2 * ad / (4095.0 - ad); 8 float T1 = 1.0 / (log(R1 / R25) / B + 1 / 298.15); 9 return T1 - 273.15f; 10 }
标签:ad,R2,float,R1,36.5,NTC,温度,查表 From: https://www.cnblogs.com/ycpkbql/p/17875512.html