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.
Thermistor.h
00001 #ifndef THERMISTOR_H 00002 #define THERMISTOR_H 00003 00004 /// サーミスタクラス 00005 /// AD変換結果から温度を算出する 00006 #define ABSTMP (273.0) 00007 class Thermistor { 00008 private: 00009 double b; ///< B定数 00010 double t0; ///< 上記B定数となる温度 00011 double rs0; ///< 上記温度での抵抗値 00012 double t; 00013 double a2, a1, a0; /// 補正多項式の係数 00014 public: 00015 /// コンストラクタ 00016 Thermistor(double B, double T0, double Rs0); 00017 00018 /// 2次式による補正係数を決定 00019 void adjust(double t1, double t1r, double t2, double t2r, double t3, double t3r); 00020 /// 1次式による補正係数を決定 00021 void adjust(double t1, double t1r, double t2, double t2r); 00022 00023 /// 抵抗値を温度値に変換する 00024 double toTempValue(double rval); 00025 }; 00026 00027 00028 00029 00030 #endif
Generated on Tue Jul 12 2022 19:08:10 by
1.7.2