![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
j
thermistor/thermistor.h
- Committer:
- zinnetyazicii53
- Date:
- 2019-09-11
- Revision:
- 1:dc9389ccc09d
File content as of revision 1:dc9389ccc09d:
#define BALANCE_RES_S 1500.0 #define SAMPLE_COUNT 100 /* Depends on the thermistor and the circuit * * [V(in)] * | * 4.7 K(ohm) | 1.5 K(ohm) * [+5V]-----------+-----/\/\/\/\/\-----+---/\/\/\/\/\-----------[0V] * | | * +-----{/\/\/\/\}-----+ * THERMISTOR 4.7 K(ohm) * */ #define RES_25C 2000.0 #define RES_36C 1400.0 #define RES_DIFF_PER_C ((RES_25C - RES_36C)/11.0) class Thermistor{ public: Thermistor(AnalogIn *aIn); double getTemperature(); private: void getResistance(); double _resistance, _temperature; AnalogIn *_aIn; };